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

Side by Side Diff: src/core/SkRecorder.cpp

Issue 484673003: Record concat as setMatrix. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove no-op INHERITED calls Created 6 years, 4 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
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkRecords.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 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 const SkPoint texCoords[4], SkXfermode* xmode, cons t SkPaint& paint) { 211 const SkPoint texCoords[4], SkXfermode* xmode, cons t SkPaint& paint) {
212 APPEND(DrawPatch, delay_copy(paint), 212 APPEND(DrawPatch, delay_copy(paint),
213 cubics ? this->copy(cubics, SkPatchUtils::kNumCtrlPts) : NULL, 213 cubics ? this->copy(cubics, SkPatchUtils::kNumCtrlPts) : NULL,
214 colors ? this->copy(colors, SkPatchUtils::kNumCorners) : NULL, 214 colors ? this->copy(colors, SkPatchUtils::kNumCorners) : NULL,
215 texCoords ? this->copy(texCoords, SkPatchUtils::kNumCorners) : NULL, 215 texCoords ? this->copy(texCoords, SkPatchUtils::kNumCorners) : NULL,
216 xmode); 216 xmode);
217 } 217 }
218 218
219 void SkRecorder::willSave() { 219 void SkRecorder::willSave() {
220 APPEND(Save); 220 APPEND(Save);
221 INHERITED(willSave);
222 } 221 }
223 222
224 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds, 223 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds,
225 const SkPaint* paint, 224 const SkPaint* paint,
226 SkCanvas::SaveFlags flags) { 225 SkCanvas::SaveFlags flags) {
227 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags); 226 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags);
228 INHERITED(willSaveLayer, bounds, paint, flags);
229 return SkCanvas::kNoLayer_SaveLayerStrategy; 227 return SkCanvas::kNoLayer_SaveLayerStrategy;
230 } 228 }
231 229
232 void SkRecorder::didRestore() { 230 void SkRecorder::didRestore() {
233 APPEND(Restore, this->devBounds(), this->getTotalMatrix()); 231 APPEND(Restore, this->devBounds(), this->getTotalMatrix());
234 INHERITED(didRestore);
235 } 232 }
236 233
237 void SkRecorder::onPushCull(const SkRect& rect) { 234 void SkRecorder::onPushCull(const SkRect& rect) {
238 APPEND(PushCull, rect); 235 APPEND(PushCull, rect);
239 } 236 }
240 237
241 void SkRecorder::onPopCull() { 238 void SkRecorder::onPopCull() {
242 APPEND(PopCull); 239 APPEND(PopCull);
243 } 240 }
244 241
245 void SkRecorder::didConcat(const SkMatrix& matrix) { 242 void SkRecorder::didConcat(const SkMatrix& matrix) {
246 APPEND(Concat, matrix); 243 this->didSetMatrix(this->getTotalMatrix());
247 INHERITED(didConcat, matrix);
248 } 244 }
249 245
250 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { 246 void SkRecorder::didSetMatrix(const SkMatrix& matrix) {
251 SkASSERT(matrix == this->getTotalMatrix()); 247 SkASSERT(matrix == this->getTotalMatrix());
252 APPEND(SetMatrix, matrix); 248 APPEND(SetMatrix, matrix);
253 INHERITED(didSetMatrix, matrix);
254 } 249 }
255 250
256 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 251 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
257 INHERITED(onClipRect, rect, op, edgeStyle); 252 INHERITED(onClipRect, rect, op, edgeStyle);
258 APPEND(ClipRect, this->devBounds(), rect, op, edgeStyle == kSoft_ClipEdgeSty le); 253 APPEND(ClipRect, this->devBounds(), rect, op, edgeStyle == kSoft_ClipEdgeSty le);
259 } 254 }
260 255
261 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 256 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
262 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false) ; 257 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false) ;
263 APPEND(ClipRRect, this->devBounds(), rrect, op, edgeStyle == kSoft_ClipEdgeS tyle); 258 APPEND(ClipRRect, this->devBounds(), rrect, op, edgeStyle == kSoft_ClipEdgeS tyle);
264 } 259 }
265 260
266 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 261 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
267 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is InverseFillType()); 262 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is InverseFillType());
268 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft _ClipEdgeStyle); 263 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft _ClipEdgeStyle);
269 } 264 }
270 265
271 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 266 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
272 INHERITED(onClipRegion, deviceRgn, op); 267 INHERITED(onClipRegion, deviceRgn, op);
273 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); 268 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op);
274 } 269 }
OLDNEW
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698