[webkit-reviews] review granted: [Bug 43804] [CHROMIUM] Use the BGRA format for canvas 2D accel upload and readback. : [Attachment 64233] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 12 13:44:49 PDT 2010


David Levin <levin at chromium.org> has granted Stephen White
<senorblanco at chromium.org>'s request for review:
Bug 43804: [CHROMIUM] Use the BGRA format for canvas 2D accel upload and
readback.
https://bugs.webkit.org/show_bug.cgi?id=43804

Attachment 64233: Patch
https://bugs.webkit.org/attachment.cgi?id=64233&action=review

------- Additional Comments from David Levin <levin at chromium.org>

> Index: WebCore/platform/graphics/chromium/GLES2Texture.cpp
> ===================================================================
> --- WebCore/platform/graphics/chromium/GLES2Texture.cpp	(revision
65251)
> +++ WebCore/platform/graphics/chromium/GLES2Texture.cpp	(working copy)
> @@ -54,6 +54,30 @@ GLES2Texture::~GLES2Texture()
>      m_context->deleteTexture(m_textureId);
>  }
>  
> +static void convertFormat(GraphicsContext3D* context, GLES2Texture::Format
format, unsigned int* glFormat, unsigned int* glType, bool* swizzle)
..
> +    default:
> +	   ASSERT(!"bad format");

This is odd, but I see it existed before. Anyway please consider using
ASSERT_NOT_REACHED(); instead.

(Also if the list of enum is short, it is considered preferable to list them
and remove the default to allow the compiler to flag enums not being handled.)

> +	   break;
> +    }
> +}
> +


More information about the webkit-reviews mailing list