OLD | NEW |
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 #include "SkRecorder.h" | 8 #include "SkRecorder.h" |
9 #include "SkPatchUtils.h" | 9 #include "SkPatchUtils.h" |
10 #include "SkPicture.h" | 10 #include "SkPicture.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 void SkRecorder::onPopCull() { | 238 void SkRecorder::onPopCull() { |
239 APPEND(PopCull); | 239 APPEND(PopCull); |
240 } | 240 } |
241 | 241 |
242 void SkRecorder::didConcat(const SkMatrix& matrix) { | 242 void SkRecorder::didConcat(const SkMatrix& matrix) { |
243 this->didSetMatrix(this->getTotalMatrix()); | 243 this->didSetMatrix(this->getTotalMatrix()); |
244 } | 244 } |
245 | 245 |
246 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { | 246 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { |
247 SkDEBUGCODE(if (matrix != this->getTotalMatrix()) { | 247 SkDEVCODE(if (matrix != this->getTotalMatrix()) { |
248 matrix.dump(); | 248 matrix.dump(); |
249 this->getTotalMatrix().dump(); | 249 this->getTotalMatrix().dump(); |
250 SkASSERT(matrix == this->getTotalMatrix()); | 250 SkASSERT(matrix == this->getTotalMatrix()); |
251 }) | 251 }) |
252 APPEND(SetMatrix, matrix); | 252 APPEND(SetMatrix, matrix); |
253 } | 253 } |
254 | 254 |
255 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { | 255 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { |
256 INHERITED(onClipRect, rect, op, edgeStyle); | 256 INHERITED(onClipRect, rect, op, edgeStyle); |
257 APPEND(ClipRect, this->devBounds(), rect, op, edgeStyle == kSoft_ClipEdgeSty
le); | 257 APPEND(ClipRect, this->devBounds(), rect, op, edgeStyle == kSoft_ClipEdgeSty
le); |
258 } | 258 } |
259 | 259 |
260 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl
e edgeStyle) { | 260 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl
e edgeStyle) { |
261 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false)
; | 261 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false)
; |
262 APPEND(ClipRRect, this->devBounds(), rrect, op, edgeStyle == kSoft_ClipEdgeS
tyle); | 262 APPEND(ClipRRect, this->devBounds(), rrect, op, edgeStyle == kSoft_ClipEdgeS
tyle); |
263 } | 263 } |
264 | 264 |
265 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { | 265 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { |
266 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is
InverseFillType()); | 266 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is
InverseFillType()); |
267 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft
_ClipEdgeStyle); | 267 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft
_ClipEdgeStyle); |
268 } | 268 } |
269 | 269 |
270 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 270 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
271 INHERITED(onClipRegion, deviceRgn, op); | 271 INHERITED(onClipRegion, deviceRgn, op); |
272 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); | 272 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); |
273 } | 273 } |
OLD | NEW |