diff options
author | bsalomon <bsalomon@google.com> | 2016-08-23 14:02:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-23 14:02:54 -0700 |
commit | 19fe41e85e6ce3e78b3a69fce1cf28edf937027d (patch) | |
tree | 79a2171ccb175dcd4229146c4b03d28af412fcb9 /src/core | |
parent | 457b42a6398020c3791f62f8c8637653e0d39bcc (diff) |
Remove SkPixelRef::getTexture()
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264293003
Review-Url: https://codereview.chromium.org/2264293003
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 10 | ||||
-rw-r--r-- | src/core/SkImagePriv.h | 2 |
2 files changed, 2 insertions, 10 deletions
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 |