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

Unified Diff: src/core/SkBlitter_Sprite.cpp

Issue 1143173011: use pixmaps for dst in sprites -- NO BITMAPS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add dox Created 5 years, 6 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/SkBlitter.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter_Sprite.cpp
diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp
index 46cd0a8e671383d03a2a19caff0b0f27af9a58ab..6dc5785cec8097c2f15336bd7ef37937ea70f35a 100644
--- a/src/core/SkBlitter_Sprite.cpp
+++ b/src/core/SkBlitter_Sprite.cpp
@@ -10,8 +10,8 @@
SkSpriteBlitter::SkSpriteBlitter(const SkPixmap& source) : fSource(source) {}
-void SkSpriteBlitter::setup(const SkBitmap& device, int left, int top, const SkPaint& paint) {
- fDevice = &device;
+void SkSpriteBlitter::setup(const SkPixmap& dst, int left, int top, const SkPaint& paint) {
+ fDst = dst;
fLeft = left;
fTop = top;
fPaint = &paint;
@@ -40,7 +40,7 @@ void SkSpriteBlitter::blitMask(const SkMask&, const SkIRect& clip) {
// returning null means the caller will call SkBlitter::Choose() and
// have wrapped the source bitmap inside a shader
-SkBlitter* SkBlitter::ChooseSprite(const SkBitmap& device, const SkPaint& paint,
+SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint,
const SkPixmap& source, int left, int top, SkTBlitterAllocator* allocator) {
/* We currently ignore antialiasing and filtertype, meaning we will take our
special blitters regardless of these settings. Ignoring filtertype seems fine
@@ -55,7 +55,7 @@ SkBlitter* SkBlitter::ChooseSprite(const SkBitmap& device, const SkPaint& paint,
SkSpriteBlitter* blitter;
- switch (device.colorType()) {
+ switch (dst.colorType()) {
case kRGB_565_SkColorType:
blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator);
break;
@@ -68,7 +68,7 @@ SkBlitter* SkBlitter::ChooseSprite(const SkBitmap& device, const SkPaint& paint,
}
if (blitter) {
- blitter->setup(device, left, top, paint);
+ blitter->setup(dst, left, top, paint);
}
return blitter;
}
« no previous file with comments | « src/core/SkBlitter.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698