aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-19 17:29:16 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-19 17:29:16 +0000
commita369e36e9d00dc83798703814cebd0b04e9525a4 (patch)
tree430c450ebc8674a357b88106785a44b5eb0d9171 /src/gpu
parent71e55762e686c8000367ea56a47c61e0c1e05402 (diff)
Revert "Revert of eliminate config param -- it was always self's config (https://codereview.chromium.org/246513002/)"
TBR=bsalomon@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/290883005 git-svn-id: http://skia.googlecode.com/svn/trunk@14785 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/SkGrPixelRef.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp
index fd21f1073b..85de285779 100644
--- a/src/gpu/SkGrPixelRef.cpp
+++ b/src/gpu/SkGrPixelRef.cpp
@@ -51,8 +51,7 @@ bool SkROLockPixelsPixelRef::onLockPixelsAreWritable() const {
///////////////////////////////////////////////////////////////////////////////
-static SkGrPixelRef* copyToTexturePixelRef(GrTexture* texture, SkBitmap::Config dstConfig,
- const SkIRect* subset) {
+static SkGrPixelRef* copyToTexturePixelRef(GrTexture* texture, const SkIRect* subset) {
if (NULL == texture) {
return NULL;
}
@@ -77,7 +76,7 @@ static SkGrPixelRef* copyToTexturePixelRef(GrTexture* texture, SkBitmap::Config
topLeft = NULL;
}
desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit;
- desc.fConfig = SkBitmapConfig2GrPixelConfig(dstConfig);
+ desc.fConfig = texture->config();
SkImageInfo info;
if (!GrPixelConfig2ColorType(desc.fConfig, &info.fColorType)) {
@@ -152,7 +151,7 @@ GrTexture* SkGrPixelRef::getTexture() {
return NULL;
}
-SkPixelRef* SkGrPixelRef::deepCopy(SkBitmap::Config dstConfig, const SkIRect* subset) {
+SkPixelRef* SkGrPixelRef::deepCopy(const SkIRect* subset) {
if (NULL == fSurface) {
return NULL;
}
@@ -163,7 +162,7 @@ SkPixelRef* SkGrPixelRef::deepCopy(SkBitmap::Config dstConfig, const SkIRect* su
// 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(), dstConfig, subset);
+ return copyToTexturePixelRef(fSurface->asTexture(), subset);
}
bool SkGrPixelRef::onReadPixels(SkBitmap* dst, const SkIRect* subset) {