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

Side by Side Diff: src/utils/SkCanvasStateUtils.cpp

Issue 163683002: Store SkRRects in SkClipStack (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix unhandled enum value warning in unit test Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | tests/CanvasTest.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 2013 Google Inc. 2 * Copyright 2013 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 #include "SkCanvasStateUtils.h" 8 #include "SkCanvasStateUtils.h"
9 9
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 class ClipValidator : public SkCanvas::ClipVisitor { 123 class ClipValidator : public SkCanvas::ClipVisitor {
124 public: 124 public:
125 ClipValidator() : fFailed(false) {} 125 ClipValidator() : fFailed(false) {}
126 bool failed() { return fFailed; } 126 bool failed() { return fFailed; }
127 127
128 // ClipVisitor 128 // ClipVisitor
129 virtual void clipRect(const SkRect& rect, SkRegion::Op op, bool antialias) S K_OVERRIDE { 129 virtual void clipRect(const SkRect& rect, SkRegion::Op op, bool antialias) S K_OVERRIDE {
130 fFailed |= antialias; 130 fFailed |= antialias;
131 } 131 }
132 132
133 virtual void clipRRect(const SkRRect& rrect, SkRegion::Op op, bool antialias ) SK_OVERRIDE {
134 fFailed |= antialias;
135 }
136
133 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) SK_OVERRI DE { 137 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) SK_OVERRI DE {
134 fFailed |= antialias; 138 fFailed |= antialias;
135 } 139 }
136 140
137 private: 141 private:
138 bool fFailed; 142 bool fFailed;
139 }; 143 };
140 144
141 static void setup_MC_state(SkMCState* state, const SkMatrix& matrix, const SkReg ion& clip) { 145 static void setup_MC_state(SkMCState* state, const SkMatrix& matrix, const SkReg ion& clip) {
142 // initialize the struct 146 // initialize the struct
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 334 }
331 335
332 return canvas.detach(); 336 return canvas.detach();
333 } 337 }
334 338
335 //////////////////////////////////////////////////////////////////////////////// 339 ////////////////////////////////////////////////////////////////////////////////
336 340
337 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) { 341 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) {
338 SkDELETE(state); 342 SkDELETE(state);
339 } 343 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698