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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 | 236 |
237 void SkRecorder::onPushCull(const SkRect& rect) { | 237 void SkRecorder::onPushCull(const SkRect& rect) { |
238 APPEND(PushCull, rect); | 238 APPEND(PushCull, rect); |
239 } | 239 } |
240 | 240 |
241 void SkRecorder::onPopCull() { | 241 void SkRecorder::onPopCull() { |
242 APPEND(PopCull); | 242 APPEND(PopCull); |
243 } | 243 } |
244 | 244 |
245 void SkRecorder::didConcat(const SkMatrix& matrix) { | 245 void SkRecorder::didConcat(const SkMatrix& matrix) { |
246 APPEND(Concat, matrix); | 246 this->didSetMatrix(this->getTotalMatrix()); |
247 INHERITED(didConcat, matrix); | 247 INHERITED(didConcat, matrix); |
reed1
2014/08/19 13:59:31
I vote to either move this INHERITED line above th
mtklein
2014/08/19 14:01:58
Done, to all the INHERITED calls which are always
| |
248 } | 248 } |
249 | 249 |
250 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { | 250 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { |
251 SkASSERT(matrix == this->getTotalMatrix()); | 251 SkASSERT(matrix == this->getTotalMatrix()); |
252 APPEND(SetMatrix, matrix); | 252 APPEND(SetMatrix, matrix); |
253 INHERITED(didSetMatrix, matrix); | 253 INHERITED(didSetMatrix, matrix); |
254 } | 254 } |
255 | 255 |
256 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { | 256 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { |
257 INHERITED(onClipRect, rect, op, edgeStyle); | 257 INHERITED(onClipRect, rect, op, edgeStyle); |
258 APPEND(ClipRect, this->devBounds(), rect, op, edgeStyle == kSoft_ClipEdgeSty le); | 258 APPEND(ClipRect, this->devBounds(), rect, op, edgeStyle == kSoft_ClipEdgeSty le); |
259 } | 259 } |
260 | 260 |
261 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { | 261 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { |
262 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false) ; | 262 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false) ; |
263 APPEND(ClipRRect, this->devBounds(), rrect, op, edgeStyle == kSoft_ClipEdgeS tyle); | 263 APPEND(ClipRRect, this->devBounds(), rrect, op, edgeStyle == kSoft_ClipEdgeS tyle); |
264 } | 264 } |
265 | 265 |
266 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { | 266 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { |
267 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is InverseFillType()); | 267 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is InverseFillType()); |
268 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft _ClipEdgeStyle); | 268 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft _ClipEdgeStyle); |
269 } | 269 } |
270 | 270 |
271 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 271 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
272 INHERITED(onClipRegion, deviceRgn, op); | 272 INHERITED(onClipRegion, deviceRgn, op); |
273 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); | 273 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); |
274 } | 274 } |
OLD | NEW |