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

Unified Diff: src/gpu/GrContext.cpp

Issue 15331003: 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: patch preferredReadPixelsConfig() 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 | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index d25709f0ea8c544017a258ff9a6f79e2c1912dce..61ca85ed3d688be90a773a81c9a10d9cfffbfabf 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1280,7 +1280,7 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target,
// dstConfig.
GrPixelConfig readConfig = dstConfig;
bool swapRAndB = false;
- if (GrPixelConfigSwapRAndB(dstConfig) == fGpu->preferredReadPixelsConfig(dstConfig)) {
+ if (GrPixelConfigSwapRAndB(dstConfig) == fGpu->preferredReadPixelsConfig(dstConfig, target->config())) {
readConfig = GrPixelConfigSwapRAndB(readConfig);
swapRAndB = true;
}
@@ -1478,7 +1478,7 @@ bool GrContext::writeRenderTargetPixels(GrRenderTarget* target,
// when drawing the scratch to the dst using a conversion effect.
bool swapRAndB = false;
GrPixelConfig writeConfig = srcConfig;
- if (fGpu->preferredWritePixelsConfig(srcConfig) == GrPixelConfigSwapRAndB(srcConfig)) {
+ if (fGpu->preferredWritePixelsConfig(srcConfig, target->config()) == GrPixelConfigSwapRAndB(srcConfig)) {
writeConfig = GrPixelConfigSwapRAndB(srcConfig);
swapRAndB = true;
}
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698