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

Unified Diff: src/gpu/GrContext.cpp

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 | « 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..751d869cfa19b3ee0e61b960bd67a41e9864d2d5 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1280,7 +1280,8 @@ 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 +1479,8 @@ 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 (GrPixelConfigSwapRAndB(srcConfig) ==
+ fGpu->preferredWritePixelsConfig(srcConfig, target->config())) {
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