Backed out changeset 661144609b7a (bug 1355430)

This commit is contained in:
Sebastian Hengst 2017-04-18 21:08:22 +02:00
Родитель 85776c9687
Коммит e4c87ce902
5 изменённых файлов: 3 добавлений и 23 удалений

Просмотреть файл

@ -710,16 +710,9 @@ TexUnpackImage::TexOrSubImage(bool isSubImage, bool needsRespec, const char* fun
return true; return true;
} while (false); } while (false);
const nsPrintfCString perfMsg("%s: Failed to hit GPU-copy fast-path: %s (src type %u)", webgl->GeneratePerfWarning("%s: Failed to hit GPU-copy fast-path. (src type %u)"
funcName, fallbackReason, uint32_t(mImage->GetFormat())); " Falling back to CPU upload. (%s)",
funcName, uint32_t(mImage->GetFormat()), fallbackReason);
if (webgl->mPixelStore_RequireFastPath) {
webgl->ErrorInvalidOperation("%s", perfMsg.BeginReading());
return false;
}
webgl->GeneratePerfWarning("%s Falling back to CPU upload.",
perfMsg.BeginReading());
const RefPtr<gfx::SourceSurface> surf = mImage->GetAsSourceSurface(); const RefPtr<gfx::SourceSurface> surf = mImage->GetAsSourceSurface();

Просмотреть файл

@ -321,9 +321,6 @@ class WebGLContext
enum { enum {
UNPACK_FLIP_Y_WEBGL = 0x9240, UNPACK_FLIP_Y_WEBGL = 0x9240,
UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241, UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241,
// We throw InvalidOperation in TexImage if we fail to use GPU fast-path
// for texture copy when it is set to true, only for debug purpose.
UNPACK_REQUIRE_FASTPATH = 0x10001,
CONTEXT_LOST_WEBGL = 0x9242, CONTEXT_LOST_WEBGL = 0x9242,
UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243, UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243,
BROWSER_DEFAULT_WEBGL = 0x9244, BROWSER_DEFAULT_WEBGL = 0x9244,
@ -1874,7 +1871,6 @@ protected:
GLenum mPixelStore_ColorspaceConversion; GLenum mPixelStore_ColorspaceConversion;
bool mPixelStore_FlipY; bool mPixelStore_FlipY;
bool mPixelStore_PremultiplyAlpha; bool mPixelStore_PremultiplyAlpha;
bool mPixelStore_RequireFastPath;
//////////////////////////////////// ////////////////////////////////////
class FakeBlackTexture { class FakeBlackTexture {

Просмотреть файл

@ -1128,13 +1128,6 @@ WebGLContext::PixelStorei(GLenum pname, GLint param)
return; return;
} }
case UNPACK_REQUIRE_FASTPATH:
if (IsExtensionEnabled(WebGLExtensionID::MOZ_debug)) {
mPixelStore_RequireFastPath = bool(param);
return;
}
break;
case LOCAL_GL_PACK_ALIGNMENT: case LOCAL_GL_PACK_ALIGNMENT:
case LOCAL_GL_UNPACK_ALIGNMENT: case LOCAL_GL_UNPACK_ALIGNMENT:
switch (param) { switch (param) {

Просмотреть файл

@ -701,7 +701,6 @@ WebGLContext::InitAndValidateGL(FailureReason* const out_failReason)
mPixelStore_FlipY = false; mPixelStore_FlipY = false;
mPixelStore_PremultiplyAlpha = false; mPixelStore_PremultiplyAlpha = false;
mPixelStore_ColorspaceConversion = BROWSER_DEFAULT_WEBGL; mPixelStore_ColorspaceConversion = BROWSER_DEFAULT_WEBGL;
mPixelStore_RequireFastPath = false;
// GLES 3.0.4, p259: // GLES 3.0.4, p259:
mPixelStore_UnpackImageHeight = 0; mPixelStore_UnpackImageHeight = 0;

Просмотреть файл

@ -1088,7 +1088,6 @@ interface EXT_disjoint_timer_query {
interface MOZ_debug { interface MOZ_debug {
const GLenum EXTENSIONS = 0x1F03; const GLenum EXTENSIONS = 0x1F03;
const GLenum WSI_INFO = 0x10000; const GLenum WSI_INFO = 0x10000;
const GLenum UNPACK_REQUIRE_FASTPATH = 0x10001;
[Throws] [Throws]
any getParameter(GLenum pname); any getParameter(GLenum pname);