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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 1077353002: setDrawFilter needs to trigger any deferred saves (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « gyp/tests.gypi ('k') | tests/DrawFilterTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 SkDELETE(fMetaData); 582 SkDELETE(fMetaData);
583 583
584 dec_canvas(); 584 dec_canvas();
585 } 585 }
586 586
587 SkDrawFilter* SkCanvas::getDrawFilter() const { 587 SkDrawFilter* SkCanvas::getDrawFilter() const {
588 return fMCRec->fFilter; 588 return fMCRec->fFilter;
589 } 589 }
590 590
591 SkDrawFilter* SkCanvas::setDrawFilter(SkDrawFilter* filter) { 591 SkDrawFilter* SkCanvas::setDrawFilter(SkDrawFilter* filter) {
592 this->checkForDeferredSave();
592 SkRefCnt_SafeAssign(fMCRec->fFilter, filter); 593 SkRefCnt_SafeAssign(fMCRec->fFilter, filter);
593 return filter; 594 return filter;
594 } 595 }
595 596
596 SkMetaData& SkCanvas::getMetaData() { 597 SkMetaData& SkCanvas::getMetaData() {
597 // metadata users are rare, so we lazily allocate it. If that changes we 598 // metadata users are rare, so we lazily allocate it. If that changes we
598 // can decide to just make it a field in the device (rather than a ptr) 599 // can decide to just make it a field in the device (rather than a ptr)
599 if (NULL == fMetaData) { 600 if (NULL == fMetaData) {
600 fMetaData = new SkMetaData; 601 fMetaData = new SkMetaData;
601 } 602 }
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 } 2560 }
2560 2561
2561 if (matrix) { 2562 if (matrix) {
2562 canvas->concat(*matrix); 2563 canvas->concat(*matrix);
2563 } 2564 }
2564 } 2565 }
2565 2566
2566 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2567 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2567 fCanvas->restoreToCount(fSaveCount); 2568 fCanvas->restoreToCount(fSaveCount);
2568 } 2569 }
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | tests/DrawFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698