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

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

Issue 803913005: Remove SkCanvas::isDrawingToLayer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init fix Created 6 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/core/SkCanvas.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 2012 Google Inc. 2 * Copyright 2012 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 SkDeferredCanvas_DEFINED 8 #ifndef SkDeferredCanvas_DEFINED
9 #define SkDeferredCanvas_DEFINED 9 #define SkDeferredCanvas_DEFINED
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 */ 137 */
138 void setBitmapSizeThreshold(size_t sizeThreshold); 138 void setBitmapSizeThreshold(size_t sizeThreshold);
139 size_t getBitmapSizeThreshold() const { return fBitmapSizeThreshold; } 139 size_t getBitmapSizeThreshold() const { return fBitmapSizeThreshold; }
140 140
141 /** 141 /**
142 * Executes all pending commands without drawing 142 * Executes all pending commands without drawing
143 */ 143 */
144 void silentFlush(); 144 void silentFlush();
145 145
146 // Overrides of the SkCanvas interface 146 // Overrides of the SkCanvas interface
147 virtual bool isDrawingToLayer() const SK_OVERRIDE;
148 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 147 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
149 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 148 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
150 const SkPaint& paint) SK_OVERRIDE; 149 const SkPaint& paint) SK_OVERRIDE;
151 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 150 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
152 virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; 151 virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
153 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 152 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
154 virtual void drawPath(const SkPath& path, const SkPaint& paint) 153 virtual void drawPath(const SkPath& path, const SkPaint& paint)
155 SK_OVERRIDE; 154 SK_OVERRIDE;
156 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, 155 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left,
157 SkScalar top, const SkPaint* paint) 156 SkScalar top, const SkPaint* paint)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 private: 240 private:
242 SkDeferredCanvas(SkDeferredDevice*); 241 SkDeferredCanvas(SkDeferredDevice*);
243 242
244 void recordedDrawCommand(); 243 void recordedDrawCommand();
245 SkCanvas* drawingCanvas() const; 244 SkCanvas* drawingCanvas() const;
246 SkCanvas* immediateCanvas() const; 245 SkCanvas* immediateCanvas() const;
247 bool isFullFrame(const SkRect*, const SkPaint*) const; 246 bool isFullFrame(const SkRect*, const SkPaint*) const;
248 void validate() const; 247 void validate() const;
249 void init(); 248 void init();
250 249
250
251 int fSaveLevel;
252 int fFirstSaveLayerIndex;
251 size_t fBitmapSizeThreshold; 253 size_t fBitmapSizeThreshold;
252 bool fDeferredDrawing; 254 bool fDeferredDrawing;
253 255
254 mutable SkISize fCachedCanvasSize; 256 mutable SkISize fCachedCanvasSize;
255 mutable bool fCachedCanvasSizeDirty; 257 mutable bool fCachedCanvasSizeDirty;
256 258
257 friend class SkDeferredCanvasTester; // for unit testing 259 friend class SkDeferredCanvasTester; // for unit testing
258 typedef SkCanvas INHERITED; 260 typedef SkCanvas INHERITED;
259 }; 261 };
260 262
261 263
262 #endif 264 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698