Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: src/gpu/GrGpu.h

Issue 15746007: fix slowness of getImageData() for CanvasRenderingContext2D in linux due to un-optimized format for… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove parens Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index ade64312b866ac0f831ad9b20e413143cd6c1ba9..5b556c5b2543607e40e042263d3ba7d54d6bf458 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -152,11 +152,18 @@ public:
void forceRenderTargetFlush();
/**
- * Gets a preferred 8888 config to use for writing / reading pixel data. The returned config
- * must have at least as many bits per channel as the config param.
+ * Gets a preferred 8888 config to use for writing/reading pixel data to/from a surface with
+ * config surfaceConfig. The returned config must have at least as many bits per channel as the
+ * readConfig or writeConfig param.
*/
- virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig config) const { return config; }
- virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig config) const { return config; }
+ virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig,
+ GrPixelConfig surfaceConfig) const {
+ return readConfig;
+ }
+ virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig,
+ GrPixelConfig surfaceConfig) const {
+ return writeConfig;
+ }
/**
* Called before uploading writing pixels to a GrTexture when the src pixel config doesn't
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698