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

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

Issue 2255283002: Fast path translate() in SkCanvas and SkLiteDL. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: plumb translate() through to SkRecord too Created 4 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/SkRecorder.h ('k') | no next file » | 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 "SkBigPicture.h" 8 #include "SkBigPicture.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkImage.h" 10 #include "SkImage.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 374
375 void SkRecorder::didConcat(const SkMatrix& matrix) { 375 void SkRecorder::didConcat(const SkMatrix& matrix) {
376 APPEND(Concat, matrix); 376 APPEND(Concat, matrix);
377 } 377 }
378 378
379 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { 379 void SkRecorder::didSetMatrix(const SkMatrix& matrix) {
380 APPEND(SetMatrix, matrix); 380 APPEND(SetMatrix, matrix);
381 } 381 }
382 382
383 void SkRecorder::didTranslate(SkScalar dx, SkScalar dy) {
384 APPEND(Translate, dx, dy);
385 }
386
383 void SkRecorder::didTranslateZ(SkScalar z) { 387 void SkRecorder::didTranslateZ(SkScalar z) {
384 #ifdef SK_EXPERIMENTAL_SHADOWING 388 #ifdef SK_EXPERIMENTAL_SHADOWING
385 APPEND(TranslateZ, z); 389 APPEND(TranslateZ, z);
386 #endif 390 #endif
387 } 391 }
388 392
389 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 393 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
390 INHERITED(onClipRect, rect, op, edgeStyle); 394 INHERITED(onClipRect, rect, op, edgeStyle);
391 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 395 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
392 APPEND(ClipRect, this->devBounds(), rect, opAA); 396 APPEND(ClipRect, this->devBounds(), rect, opAA);
(...skipping 12 matching lines...) Expand all
405 } 409 }
406 410
407 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 411 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
408 INHERITED(onClipRegion, deviceRgn, op); 412 INHERITED(onClipRegion, deviceRgn, op);
409 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); 413 APPEND(ClipRegion, this->devBounds(), deviceRgn, op);
410 } 414 }
411 415
412 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) { 416 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) {
413 return nullptr; 417 return nullptr;
414 } 418 }
OLDNEW
« no previous file with comments | « src/core/SkRecorder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698