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

Unified Diff: src/core/SkSpriteBlitterTemplate.h

Issue 1156713004: remove bitmaps entirely from sprite blits (as source) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « src/core/SkSpriteBlitter.h ('k') | src/core/SkSpriteBlitter_ARGB32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpriteBlitterTemplate.h
diff --git a/src/core/SkSpriteBlitterTemplate.h b/src/core/SkSpriteBlitterTemplate.h
index 0243e4f28a0eb1f7ee7c27059607d735255f3da4..3806dbcd31fc0ee2b6aa73889c60746ad881ed16 100644
--- a/src/core/SkSpriteBlitterTemplate.h
+++ b/src/core/SkSpriteBlitterTemplate.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -6,12 +5,9 @@
* found in the LICENSE file.
*/
-
-
class SkSPRITE_CLASSNAME : public SkSpriteBlitter {
public:
- SkSPRITE_CLASSNAME(const SkBitmap& source SkSPRITE_ARGS)
- : SkSpriteBlitter(source) {
+ SkSPRITE_CLASSNAME(const SkPixmap& source SkSPRITE_ARGS) : SkSpriteBlitter(source) {
SkSPRITE_INIT
}
@@ -20,15 +16,14 @@ public:
int srcX = x - fLeft;
int srcY = y - fTop;
SkSPRITE_DST_TYPE* SK_RESTRICT dst =fDevice->SkSPRITE_DST_GETADDR(x, y);
- const SkSPRITE_SRC_TYPE* SK_RESTRICT src =
- fSource->SkSPRITE_SRC_GETADDR(srcX, srcY);
+ const SkSPRITE_SRC_TYPE* SK_RESTRICT src = fSource.SkSPRITE_SRC_GETADDR(srcX, srcY);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
SkDEBUGCODE((void)fDevice->SkSPRITE_DST_GETADDR(x + width - 1, y + height - 1);)
- SkDEBUGCODE((void)fSource->SkSPRITE_SRC_GETADDR(srcX + width - 1, srcY + height - 1);)
+ SkDEBUGCODE((void)fSource.SkSPRITE_SRC_GETADDR(srcX + width - 1, srcY + height - 1);)
- SkSPRITE_PREAMBLE((*fSource), srcX, srcY);
+ SkSPRITE_PREAMBLE(fSource, srcX, srcY);
do {
SkSPRITE_DST_TYPE* d = dst;
@@ -48,8 +43,7 @@ public:
} while (--w != 0);
#endif
dst = (SkSPRITE_DST_TYPE* SK_RESTRICT)((char*)dst + dstRB);
- src = (const SkSPRITE_SRC_TYPE* SK_RESTRICT)
- ((const char*)src + srcRB);
+ src = (const SkSPRITE_SRC_TYPE* SK_RESTRICT)((const char*)src + srcRB);
SkSPRITE_NEXT_ROW
#ifdef SkSPRITE_ROW_PROC
y += 1;
« no previous file with comments | « src/core/SkSpriteBlitter.h ('k') | src/core/SkSpriteBlitter_ARGB32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698