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

Side by Side Diff: include/core/SkCanvas.h

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 | « no previous file | include/private/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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 1345
1346 virtual void willSave() {} 1346 virtual void willSave() {}
1347 // Overriders should call the corresponding INHERITED method up the inherita nce chain. 1347 // Overriders should call the corresponding INHERITED method up the inherita nce chain.
1348 virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) { 1348 virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) {
1349 return kFullLayer_SaveLayerStrategy; 1349 return kFullLayer_SaveLayerStrategy;
1350 } 1350 }
1351 virtual void willRestore() {} 1351 virtual void willRestore() {}
1352 virtual void didRestore() {} 1352 virtual void didRestore() {}
1353 virtual void didConcat(const SkMatrix&) {} 1353 virtual void didConcat(const SkMatrix&) {}
1354 virtual void didSetMatrix(const SkMatrix&) {} 1354 virtual void didSetMatrix(const SkMatrix&) {}
1355 virtual void didTranslate(SkScalar dx, SkScalar dy) {
1356 this->didConcat(SkMatrix::MakeTrans(dx, dy));
1357 }
1355 1358
1356 #ifdef SK_EXPERIMENTAL_SHADOWING 1359 #ifdef SK_EXPERIMENTAL_SHADOWING
1357 virtual void didTranslateZ(SkScalar) {} 1360 virtual void didTranslateZ(SkScalar) {}
1358 #endif 1361 #endif
1359 1362
1360 virtual void onDrawAnnotation(const SkRect&, const char key[], SkData* value ); 1363 virtual void onDrawAnnotation(const SkRect&, const char key[], SkData* value );
1361 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&); 1364 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&);
1362 1365
1363 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, 1366 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x,
1364 SkScalar y, const SkPaint& paint); 1367 SkScalar y, const SkPaint& paint);
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 1684
1682 class SkCanvasClipVisitor { 1685 class SkCanvasClipVisitor {
1683 public: 1686 public:
1684 virtual ~SkCanvasClipVisitor(); 1687 virtual ~SkCanvasClipVisitor();
1685 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1688 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1686 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1689 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1687 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1690 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1688 }; 1691 };
1689 1692
1690 #endif 1693 #endif
OLDNEW
« no previous file with comments | « no previous file | include/private/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698