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

Side by Side Diff: include/core/SkDevice.h

Issue 783493002: Change clear() to respect the clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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') | include/core/SkPicture.h » ('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 2010 The Android Open Source Project 2 * Copyright 2010 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 #ifndef SkDevice_DEFINED 8 #ifndef SkDevice_DEFINED
9 #define SkDevice_DEFINED 9 #define SkDevice_DEFINED
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 * picture of the current clip. (i.e. if you regionize all of the geometry 157 * picture of the current clip. (i.e. if you regionize all of the geometry
158 * in the clipstack, you will arrive at an equivalent region to the one 158 * in the clipstack, you will arrive at an equivalent region to the one
159 * passed in). 159 * passed in).
160 */ 160 */
161 virtual void setMatrixClip(const SkMatrix&, const SkRegion&, 161 virtual void setMatrixClip(const SkMatrix&, const SkRegion&,
162 const SkClipStack&) {}; 162 const SkClipStack&) {};
163 163
164 private: 164 private:
165 /** Clears the entire device to the specified color (including alpha). 165 /** Clears the entire device to the specified color (including alpha).
166 * Ignores the clip. 166 * Ignores the clip.
167 * DEPRECATED : will go away when chrome subclasses have been updated
167 */ 168 */
168 virtual void clear(SkColor color) = 0; 169 virtual void clear(SkColor color);
169 public: 170 public:
170 171
171 /** These are called inside the per-device-layer loop for each draw call. 172 /** These are called inside the per-device-layer loop for each draw call.
172 When these are called, we have already applied any saveLayer operations, 173 When these are called, we have already applied any saveLayer operations,
173 and are handling any looping from the paint, and any effects from the 174 and are handling any looping from the paint, and any effects from the
174 DrawFilter. 175 DrawFilter.
175 */ 176 */
176 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; 177 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0;
177 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t, 178 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t,
178 const SkPoint[], const SkPaint& paint) = 0; 179 const SkPoint[], const SkPaint& paint) = 0;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 SkDeviceProperties* fLeakyProperties; // will always exist. 398 SkDeviceProperties* fLeakyProperties; // will always exist.
398 399
399 #ifdef SK_DEBUG 400 #ifdef SK_DEBUG
400 bool fAttachedToCanvas; 401 bool fAttachedToCanvas;
401 #endif 402 #endif
402 403
403 typedef SkRefCnt INHERITED; 404 typedef SkRefCnt INHERITED;
404 }; 405 };
405 406
406 #endif 407 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698