Fix WritePixels test on ANGLE.
Don't upload BGRA to RGBA if not supported (ES2 w/ EXT BGRA extension).
R=senorblanco@chromium.org
Review URL: https://codereview.appspot.com/7305046
git-svn-id: http://skia.googlecode.com/svn/trunk@7622 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index dc69766..3b5e9c4 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -531,8 +531,11 @@
* @param rowBytes number of bytes between consecutive rows. Zero means rows are tightly
* packed.
* @param pixelOpsFlags see PixelOpsFlags enum above.
+ *
+ * @return true if the write succeeded, false if not. The write can fail because of an
+ * unsupported combination of target and pixel configs.
*/
- void writeRenderTargetPixels(GrRenderTarget* target,
+ bool writeRenderTargetPixels(GrRenderTarget* target,
int left, int top, int width, int height,
GrPixelConfig config, const void* buffer,
size_t rowBytes = 0,
@@ -572,8 +575,10 @@
* @param rowBytes number of bytes between consecutive rows. Zero
* means rows are tightly packed.
* @param pixelOpsFlags see PixelOpsFlags enum above.
+ * @return true if the write succeeded, false if not. The write can fail because of an
+ * unsupported combination of texture and pixel configs.
*/
- void writeTexturePixels(GrTexture* texture,
+ bool writeTexturePixels(GrTexture* texture,
int left, int top, int width, int height,
GrPixelConfig config, const void* buffer,
size_t rowBytes,