From 19fe41e85e6ce3e78b3a69fce1cf28edf937027d Mon Sep 17 00:00:00 2001 From: bsalomon Date: Tue, 23 Aug 2016 14:02:54 -0700 Subject: Remove SkPixelRef::getTexture() GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264293003 Review-Url: https://codereview.chromium.org/2264293003 --- src/core/SkBitmapDevice.cpp | 10 ++-------- src/core/SkImagePriv.h | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 75eaa963b5..3f3e5fd84e 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -281,14 +281,8 @@ void SkBitmapDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, // since we may need to clamp to the borders of the src rect within // the bitmap, we extract a subset. const SkIRect srcIR = tmpSrc.roundOut(); - if(bitmap.pixelRef()->getTexture()) { - // Accelerated source canvas, don't use extractSubset but readPixels to get the subset. - // This way, the pixels are copied in CPU memory instead of GPU memory. - bitmap.pixelRef()->readPixels(&tmpBitmap, kN32_SkColorType, &srcIR); - } else { - if (!bitmap.extractSubset(&tmpBitmap, srcIR)) { - return; - } + if (!bitmap.extractSubset(&tmpBitmap, srcIR)) { + return; } bitmapPtr = &tmpBitmap; diff --git a/src/core/SkImagePriv.h b/src/core/SkImagePriv.h index 0377762def..8e2f5cecde 100644 --- a/src/core/SkImagePriv.h +++ b/src/core/SkImagePriv.h @@ -75,8 +75,6 @@ extern void SkTextureImageApplyBudgetedDecision(SkImage* textureImage); // surface needs to perform a copy-on-write extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); -GrTexture* GrDeepCopyTexture(GrTexture* src, SkBudgeted); - /** * Will attempt to upload and lock the contents of the image as a texture, so that subsequent * draws to a gpu-target will come from that texture (and not by looking at the original image -- cgit v1.2.3