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

Side by Side Diff: src/core/SkLiteRecorder.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 | « src/core/SkLiteDL.cpp ('k') | src/core/SkLiteRecorder.cpp » ('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 2016 Google Inc. 2 * Copyright 2016 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 #ifndef SkLiteRecorder_DEFINED 8 #ifndef SkLiteRecorder_DEFINED
9 #define SkLiteRecorder_DEFINED 9 #define SkLiteRecorder_DEFINED
10 10
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 12
13 class SkLiteDL; 13 class SkLiteDL;
14 14
15 class SkLiteRecorder final : public SkCanvas { 15 class SkLiteRecorder final : public SkCanvas {
16 public: 16 public:
17 SkLiteRecorder(); 17 SkLiteRecorder();
18 void reset(SkLiteDL*); 18 void reset(SkLiteDL*);
19 19
20 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride; 20 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride;
21 21
22 void willSave() override; 22 void willSave() override;
23 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; 23 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override;
24 void willRestore() override; 24 void willRestore() override;
25 25
26 void didConcat(const SkMatrix&) override; 26 void didConcat(const SkMatrix&) override;
27 void didSetMatrix(const SkMatrix&) override; 27 void didSetMatrix(const SkMatrix&) override;
28 void didTranslate(SkScalar, SkScalar) override;
28 29
29 void onClipRect (const SkRect&, SkRegion::Op, ClipEdgeStyle) override; 30 void onClipRect (const SkRect&, SkRegion::Op, ClipEdgeStyle) override;
30 void onClipRRect (const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; 31 void onClipRRect (const SkRRect&, SkRegion::Op, ClipEdgeStyle) override;
31 void onClipPath (const SkPath&, SkRegion::Op, ClipEdgeStyle) override; 32 void onClipPath (const SkPath&, SkRegion::Op, ClipEdgeStyle) override;
32 void onClipRegion(const SkRegion&, SkRegion::Op) override; 33 void onClipRegion(const SkRegion&, SkRegion::Op) override;
33 34
34 void onDrawPaint (const SkPaint&) override; 35 void onDrawPaint (const SkPaint&) override;
35 void onDrawPath (const SkPath&, const SkPaint&) override; 36 void onDrawPath (const SkPath&, const SkPaint&) override;
36 void onDrawRect (const SkRect&, const SkPaint&) override; 37 void onDrawRect (const SkRect&, const SkPaint&) override;
37 void onDrawOval (const SkRect&, const SkPaint&) override; 38 void onDrawOval (const SkRect&, const SkPaint&) override;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #else 79 #else
79 void didTranslateZ(SkScalar); 80 void didTranslateZ(SkScalar);
80 void onDrawShadowedPicture(const SkPicture*, const SkMatrix*, const SkPaint* ); 81 void onDrawShadowedPicture(const SkPicture*, const SkMatrix*, const SkPaint* );
81 #endif 82 #endif
82 83
83 private: 84 private:
84 SkLiteDL* fDL; 85 SkLiteDL* fDL;
85 }; 86 };
86 87
87 #endif//SkLiteRecorder_DEFINED 88 #endif//SkLiteRecorder_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkLiteDL.cpp ('k') | src/core/SkLiteRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698