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

Side by Side Diff: include/utils/SkNoSaveLayerCanvas.h

Issue 1533953002: change signature for virtual related to saveLayer, passing SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update comment Created 5 years 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/core/SkCanvas.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 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 #ifndef SkNoSaveLayerCanvas_DEFINED 8 #ifndef SkNoSaveLayerCanvas_DEFINED
9 #define SkNoSaveLayerCanvas_DEFINED 9 #define SkNoSaveLayerCanvas_DEFINED
10 10
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkRRect.h" 12 #include "SkRRect.h"
13 13
14 // The NoSaveLayerCanvas is used to play back SkPictures when the saveLayer 14 // The NoSaveLayerCanvas is used to play back SkPictures when the saveLayer
15 // functionality isn't required (e.g., during analysis of the draw calls). 15 // functionality isn't required (e.g., during analysis of the draw calls).
16 // It also simplifies the clipping calls to only use rectangles. 16 // It also simplifies the clipping calls to only use rectangles.
17 class SK_API SkNoSaveLayerCanvas : public SkCanvas { 17 class SK_API SkNoSaveLayerCanvas : public SkCanvas {
18 public: 18 public:
19 SkNoSaveLayerCanvas(SkBaseDevice* device) 19 SkNoSaveLayerCanvas(SkBaseDevice* device)
20 : INHERITED(device, kConservativeRasterClip_InitFlag) 20 : INHERITED(device, kConservativeRasterClip_InitFlag)
21 {} 21 {}
22 22
23 protected: 23 protected:
24 virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint* paint, 24 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec& rec) override {
25 SaveFlags flags) override { 25 (void)this->INHERITED::getSaveLayerStrategy(rec);
26 this->INHERITED::willSaveLayer(bounds, paint, flags);
27 return kNoLayer_SaveLayerStrategy; 26 return kNoLayer_SaveLayerStrategy;
28 } 27 }
29 28
30 private: 29 private:
31 typedef SkCanvas INHERITED; 30 typedef SkCanvas INHERITED;
32 }; 31 };
33 32
34 #endif // SkNoSaveLayerCanvas_DEFINED 33 #endif // SkNoSaveLayerCanvas_DEFINED
OLDNEW
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698