aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-01-07 07:28:41 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-07 07:28:41 -0800
commit783fe16b8ed1cd1cff34eacc33296874a32f293b (patch)
tree18a8a4641125e2a092a6af30ac500238ffa62a98 /src/gpu
parentc56fb00373fc6138f9530c2e47ddfd68c28dfc50 (diff)
Rename SkDrawPictureCallback to SkPicture::AbortCallback
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrRecordReplaceDraw.cpp28
-rw-r--r--src/gpu/GrRecordReplaceDraw.h5
2 files changed, 16 insertions, 17 deletions
diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp
index 0ceea3721f..234f92f24f 100644
--- a/src/gpu/GrRecordReplaceDraw.cpp
+++ b/src/gpu/GrRecordReplaceDraw.cpp
@@ -55,7 +55,7 @@ public:
const SkPicture* topLevelPicture,
const SkPicture* picture,
const SkMatrix& initialMatrix,
- SkDrawPictureCallback* callback,
+ SkPicture::AbortCallback* callback,
const unsigned* opIndices, int numIndices)
: INHERITED(canvas, drawablePicts, NULL, drawableCount)
, fCanvas(canvas)
@@ -92,7 +92,7 @@ public:
bbh->search(query, &fOps);
for (fIndex = 0; fIndex < fOps.count(); ++fIndex) {
- if (fCallback && fCallback->abortDrawing()) {
+ if (fCallback && fCallback->abort()) {
return fNumReplaced;
}
@@ -101,7 +101,7 @@ public:
} else {
for (fIndex = 0; fIndex < (int) record->count(); ++fIndex) {
- if (fCallback && fCallback->abortDrawing()) {
+ if (fCallback && fCallback->abort()) {
return fNumReplaced;
}
@@ -181,19 +181,19 @@ public:
}
private:
- SkCanvas* fCanvas;
- GrLayerCache* fLayerCache;
- const SkPicture* fTopLevelPicture;
- const SkPicture* fPicture;
- const SkMatrix fInitialMatrix;
- SkDrawPictureCallback* fCallback;
+ SkCanvas* fCanvas;
+ GrLayerCache* fLayerCache;
+ const SkPicture* fTopLevelPicture;
+ const SkPicture* fPicture;
+ const SkMatrix fInitialMatrix;
+ SkPicture::AbortCallback* fCallback;
- SkTDArray<unsigned> fOps;
- int fIndex;
- int fNumReplaced;
+ SkTDArray<unsigned> fOps;
+ int fIndex;
+ int fNumReplaced;
// The op code indices of all the enclosing drawPicture and saveLayer calls
- SkTDArray<unsigned> fOpIndexStack;
+ SkTDArray<unsigned> fOpIndexStack;
typedef Draw INHERITED;
};
@@ -202,7 +202,7 @@ int GrRecordReplaceDraw(const SkPicture* picture,
SkCanvas* canvas,
GrLayerCache* layerCache,
const SkMatrix& initialMatrix,
- SkDrawPictureCallback* callback) {
+ SkPicture::AbortCallback* callback) {
SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/);
// TODO: drawablePicts?
diff --git a/src/gpu/GrRecordReplaceDraw.h b/src/gpu/GrRecordReplaceDraw.h
index c0dd0b6a32..0dadcfa0cb 100644
--- a/src/gpu/GrRecordReplaceDraw.h
+++ b/src/gpu/GrRecordReplaceDraw.h
@@ -8,12 +8,11 @@
#ifndef GrRecordReplaceDraw_DEFINED
#define GrRecordReplaceDraw_DEFINED
-#include "SkDrawPictureCallback.h"
+#include "SkPicture.h"
class GrLayerCache;
class SkCanvas;
class SkMatrix;
-class SkPicture;
// Draw an SkPicture into an SkCanvas replacing saveLayer/restore blocks with
// drawBitmap calls. A convenience wrapper around SkRecords::Draw.
@@ -22,6 +21,6 @@ int GrRecordReplaceDraw(const SkPicture*,
SkCanvas*,
GrLayerCache* layerCache,
const SkMatrix& initialMatrix,
- SkDrawPictureCallback*);
+ SkPicture::AbortCallback*);
#endif // GrRecordReplaceDraw_DEFINED