зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1045955 - Make snapshots pick RGBA or RGBX. - r=kamidphish
This commit is contained in:
Родитель
e460833f90
Коммит
4f8b794b06
|
@ -1477,9 +1477,13 @@ WebGLContext::GetSurfaceSnapshot(bool* aPremultAlpha)
|
|||
if (!gl)
|
||||
return nullptr;
|
||||
|
||||
RefPtr<DataSourceSurface> surf = Factory::CreateDataSourceSurfaceWithStride(IntSize(mWidth, mHeight),
|
||||
SurfaceFormat::B8G8R8A8,
|
||||
mWidth * 4);
|
||||
bool hasAlpha = mOptions.alpha;
|
||||
SurfaceFormat surfFormat = hasAlpha ? SurfaceFormat::B8G8R8A8
|
||||
: SurfaceFormat::B8G8R8X8;
|
||||
RefPtr<DataSourceSurface> surf;
|
||||
surf = Factory::CreateDataSourceSurfaceWithStride(IntSize(mWidth, mHeight),
|
||||
surfFormat,
|
||||
mWidth * 4);
|
||||
if (!surf) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -812,6 +812,7 @@ GLBlitHelper::BlitTextureToFramebuffer(GLuint srcTex, GLuint destFB,
|
|||
}
|
||||
|
||||
ScopedGLDrawState autoStates(mGL);
|
||||
mGL->BindDrawFB(destFB);
|
||||
|
||||
// Does destructive things to (only!) what we just saved above.
|
||||
bool good = UseTexQuadProgram(type, srcSize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче