Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/core/SkBitmapDevice.cpp

Issue 2264293003: Remove SkPixelRef::getTexture() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPixelRef.h ('k') | src/core/SkImagePriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapDevice.cpp
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 75eaa963b59e74910c2704133d0981805078fccf..3f3e5fd84e47b1d75434754fc9df5b2da834b9f7 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;
« no previous file with comments | « include/core/SkPixelRef.h ('k') | src/core/SkImagePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698