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

Unified Diff: src/core/SkSpriteBlitter_ARGB32.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/SkSpriteBlitterTemplate.h ('k') | src/core/SkSpriteBlitter_RGB16.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpriteBlitter_ARGB32.cpp
diff --git a/src/core/SkSpriteBlitter_ARGB32.cpp b/src/core/SkSpriteBlitter_ARGB32.cpp
index 4138b72902d2632a96604d0c37df473c9721d252..962e2ac651dbcac0ba0a495d2ce15cda89477202 100644
--- a/src/core/SkSpriteBlitter_ARGB32.cpp
+++ b/src/core/SkSpriteBlitter_ARGB32.cpp
@@ -36,9 +36,9 @@ public:
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
- uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y);
+ uint32_t* SK_RESTRICT dst = fDst.writable_addr32(x, y);
const uint32_t* SK_RESTRICT src = fSource.addr32(x - fLeft, y - fTop);
- size_t dstRB = fDevice->rowBytes();
+ size_t dstRB = fDst.rowBytes();
size_t srcRB = fSource.rowBytes();
SkBlitRow::Proc32 proc = fProc32;
U8CPU alpha = fAlpha;
@@ -89,10 +89,10 @@ public:
SkSafeUnref(fColorFilter);
}
- void setup(const SkBitmap& device, int left, int top, const SkPaint& paint) override {
- this->INHERITED::setup(device, left, top, paint);
+ void setup(const SkPixmap& dst, int left, int top, const SkPaint& paint) override {
+ this->INHERITED::setup(dst, left, top, paint);
- int width = device.width();
+ int width = dst.width();
if (width > fBufferSize) {
fBufferSize = width;
delete[] fBuffer;
@@ -121,9 +121,9 @@ public:
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
- uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y);
+ uint32_t* SK_RESTRICT dst = fDst.writable_addr32(x, y);
const uint32_t* SK_RESTRICT src = fSource.addr32(x - fLeft, y - fTop);
- size_t dstRB = fDevice->rowBytes();
+ size_t dstRB = fDst.rowBytes();
size_t srcRB = fSource.rowBytes();
SkColorFilter* colorFilter = fColorFilter;
SkXfermode* xfermode = fXfermode;
@@ -167,9 +167,9 @@ public:
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
- SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
+ SkPMColor* SK_RESTRICT dst = fDst.writable_addr32(x, y);
const SkPMColor16* SK_RESTRICT src = fSource.addr16(x - fLeft, y - fTop);
- size_t dstRB = fDevice->rowBytes();
+ size_t dstRB = fDst.rowBytes();
size_t srcRB = fSource.rowBytes();
SkPMColor* SK_RESTRICT buffer = fBuffer;
SkColorFilter* colorFilter = fColorFilter;
@@ -213,9 +213,9 @@ public:
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
- SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
+ SkPMColor* SK_RESTRICT dst = fDst.writable_addr32(x, y);
const SkPMColor16* SK_RESTRICT src = fSource.addr16(x - fLeft, y - fTop);
- size_t dstRB = fDevice->rowBytes();
+ size_t dstRB = fDst.rowBytes();
size_t srcRB = fSource.rowBytes();
do {
@@ -241,9 +241,9 @@ public:
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
- SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
+ SkPMColor* SK_RESTRICT dst = fDst.writable_addr32(x, y);
const SkPMColor16* SK_RESTRICT src = fSource.addr16(x - fLeft, y - fTop);
- size_t dstRB = fDevice->rowBytes();
+ size_t dstRB = fDst.rowBytes();
size_t srcRB = fSource.rowBytes();
do {
« no previous file with comments | « src/core/SkSpriteBlitterTemplate.h ('k') | src/core/SkSpriteBlitter_RGB16.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698