| Index: src/core/SkCanvas.cpp
|
| diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
|
| index 221ed93ac8c20122ebe47b1c6dccce8defcc3fb9..a8666c46864e8be5fff81058fb81063018b9354b 100644
|
| --- a/src/core/SkCanvas.cpp
|
| +++ b/src/core/SkCanvas.cpp
|
| @@ -78,12 +78,6 @@ bool SkCanvas::Internal_Private_GetTreatSpriteAsBitmap() {
|
|
|
| typedef SkTLazy<SkPaint> SkLazyPaint;
|
|
|
| -void SkCanvas::predrawNotify() {
|
| - if (fSurfaceBase) {
|
| - fSurfaceBase->aboutToDraw(SkSurface::kRetain_ContentChangeMode);
|
| - }
|
| -}
|
| -
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| static uint32_t filter_paint_flags(const SkSurfaceProps& props, uint32_t flags) {
|
| @@ -409,13 +403,11 @@ bool AutoDrawLooper::doNext(SkDrawFilter::Type drawType) {
|
| ////////// macros to place around the internal draw calls //////////////////
|
|
|
| #define LOOPER_BEGIN_DRAWDEVICE(paint, type) \
|
| - this->predrawNotify(); \
|
| AutoDrawLooper looper(this, fProps, paint, true); \
|
| while (looper.next(type)) { \
|
| SkDrawIter iter(this);
|
|
|
| #define LOOPER_BEGIN(paint, type, bounds) \
|
| - this->predrawNotify(); \
|
| AutoDrawLooper looper(this, fProps, paint, false, bounds); \
|
| while (looper.next(type)) { \
|
| SkDrawIter iter(this);
|
| @@ -440,8 +432,6 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) {
|
| fMCRec->fLayer = SkNEW_ARGS(DeviceCM, (NULL, 0, 0, NULL, NULL, fConservativeRasterClip));
|
| fMCRec->fTopLayer = fMCRec->fLayer;
|
|
|
| - fSurfaceBase = NULL;
|
| -
|
| fClipStack.reset(SkNEW(SkClipStack));
|
|
|
| if (device) {
|
| @@ -717,9 +707,6 @@ bool SkCanvas::writePixels(const SkImageInfo& origInfo, const void* pixels, size
|
| // here x,y are either 0 or negative
|
| pixels = ((const char*)pixels - y * rowBytes - x * info.bytesPerPixel());
|
|
|
| - // Tell our owning surface to bump its generation ID
|
| - this->predrawNotify();
|
| -
|
| // The device can assert that the requested area is always contained in its bounds
|
| return device->writePixels(info, pixels, rowBytes, target.x(), target.y());
|
| }
|
| @@ -1665,8 +1652,8 @@ void SkCanvas::drawSprite(const SkBitmap& bitmap, int left, int top, const SkPai
|
| //////////////////////////////////////////////////////////////////////////////
|
|
|
| void SkCanvas::onDiscard() {
|
| - if (fSurfaceBase) {
|
| - fSurfaceBase->aboutToDraw(SkSurface::kDiscard_ContentChangeMode);
|
| + if (this->getDevice()) {
|
| + this->getDevice()->discard();
|
| }
|
| }
|
|
|
|
|