OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |