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

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

Issue 1634573002: SK_SUPPORT_LEGACY_DRAWFLTER typo (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « include/utils/SkNWayCanvas.h ('k') | src/utils/SkNWayCanvas.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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkCanvasPriv.h" 10 #include "SkCanvasPriv.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 class AutoDrawLooper { 438 class AutoDrawLooper {
439 public: 439 public:
440 // "rawBounds" is the original bounds of the primitive about to be drawn, un modified by the 440 // "rawBounds" is the original bounds of the primitive about to be drawn, un modified by the
441 // paint. It's used to determine the size of the offscreen layer for filters . 441 // paint. It's used to determine the size of the offscreen layer for filters .
442 // If null, the clip will be used instead. 442 // If null, the clip will be used instead.
443 AutoDrawLooper(SkCanvas* canvas, const SkSurfaceProps& props, const SkPaint& paint, 443 AutoDrawLooper(SkCanvas* canvas, const SkSurfaceProps& props, const SkPaint& paint,
444 bool skipLayerForImageFilter = false, 444 bool skipLayerForImageFilter = false,
445 const SkRect* rawBounds = nullptr) : fOrigPaint(paint) { 445 const SkRect* rawBounds = nullptr) : fOrigPaint(paint) {
446 fCanvas = canvas; 446 fCanvas = canvas;
447 #ifdef SK_SUPPORT_LEGACY_DRAWFLTER 447 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER
448 fFilter = canvas->getDrawFilter(); 448 fFilter = canvas->getDrawFilter();
449 #else 449 #else
450 fFilter = nullptr; 450 fFilter = nullptr;
451 #endif 451 #endif
452 fPaint = &fOrigPaint; 452 fPaint = &fOrigPaint;
453 fSaveCount = canvas->getSaveCount(); 453 fSaveCount = canvas->getSaveCount();
454 fTempLayerForImageFilter = false; 454 fTempLayerForImageFilter = false;
455 fDone = false; 455 fDone = false;
456 456
457 SkColorFilter* simplifiedCF = image_to_color_filter(fOrigPaint); 457 SkColorFilter* simplifiedCF = image_to_color_filter(fOrigPaint);
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 // free up the contents of our deque 775 // free up the contents of our deque
776 this->restoreToCount(1); // restore everything but the last 776 this->restoreToCount(1); // restore everything but the last
777 777
778 this->internalRestore(); // restore the last, since we're going away 778 this->internalRestore(); // restore the last, since we're going away
779 779
780 delete fMetaData; 780 delete fMetaData;
781 781
782 dec_canvas(); 782 dec_canvas();
783 } 783 }
784 784
785 #ifdef SK_SUPPORT_LEGACY_DRAWFLTER 785 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER
786 SkDrawFilter* SkCanvas::getDrawFilter() const { 786 SkDrawFilter* SkCanvas::getDrawFilter() const {
787 return fMCRec->fFilter; 787 return fMCRec->fFilter;
788 } 788 }
789 789
790 SkDrawFilter* SkCanvas::setDrawFilter(SkDrawFilter* filter) { 790 SkDrawFilter* SkCanvas::setDrawFilter(SkDrawFilter* filter) {
791 this->checkForDeferredSave(); 791 this->checkForDeferredSave();
792 SkRefCnt_SafeAssign(fMCRec->fFilter, filter); 792 SkRefCnt_SafeAssign(fMCRec->fFilter, filter);
793 return filter; 793 return filter;
794 } 794 }
795 #endif 795 #endif
(...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after
3015 } 3015 }
3016 3016
3017 if (matrix) { 3017 if (matrix) {
3018 canvas->concat(*matrix); 3018 canvas->concat(*matrix);
3019 } 3019 }
3020 } 3020 }
3021 3021
3022 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 3022 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
3023 fCanvas->restoreToCount(fSaveCount); 3023 fCanvas->restoreToCount(fSaveCount);
3024 } 3024 }
OLDNEW
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698