| 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;
|
| }
|
|
|