| Index: src/gpu/SkGrPixelRef.cpp
|
| diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp
|
| index f0e4e322f8b9e9df9af9716e322dd098dc9a0261..18fefcc7893b01146698027edf5c451e87e170e3 100644
|
| --- a/src/gpu/SkGrPixelRef.cpp
|
| +++ b/src/gpu/SkGrPixelRef.cpp
|
| @@ -51,7 +51,8 @@
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -static SkGrPixelRef* copyToTexturePixelRef(GrTexture* texture, const SkIRect* subset) {
|
| +static SkGrPixelRef* copyToTexturePixelRef(GrTexture* texture, SkBitmap::Config dstConfig,
|
| + const SkIRect* subset) {
|
| if (NULL == texture) {
|
| return NULL;
|
| }
|
| @@ -76,7 +77,7 @@
|
| topLeft = NULL;
|
| }
|
| desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit;
|
| - desc.fConfig = texture->config();
|
| + desc.fConfig = SkBitmapConfig2GrPixelConfig(dstConfig);
|
|
|
| SkImageInfo info;
|
| if (!GrPixelConfig2ColorType(desc.fConfig, &info.fColorType)) {
|
| @@ -151,7 +152,7 @@
|
| return NULL;
|
| }
|
|
|
| -SkPixelRef* SkGrPixelRef::deepCopy(const SkIRect* subset) {
|
| +SkPixelRef* SkGrPixelRef::deepCopy(SkBitmap::Config dstConfig, const SkIRect* subset) {
|
| if (NULL == fSurface) {
|
| return NULL;
|
| }
|
| @@ -162,7 +163,7 @@
|
| // a GrTexture owned elsewhere (e.g., SkGpuDevice), and cannot live
|
| // independently of that texture. Texture-backed pixel refs, on the other
|
| // hand, own their GrTextures, and are thus self-contained.
|
| - return copyToTexturePixelRef(fSurface->asTexture(), subset);
|
| + return copyToTexturePixelRef(fSurface->asTexture(), dstConfig, subset);
|
| }
|
|
|
| bool SkGrPixelRef::onReadPixels(SkBitmap* dst, const SkIRect* subset) {
|
|
|