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

Side by Side Diff: src/utils/SkCanvasStack.h

Issue 195793012: De-virtualize SkCanvas matrix ops. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkCanvasStack.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SkCanvasStack_DEFINED 9 #ifndef SkCanvasStack_DEFINED
10 #define SkCanvasStack_DEFINED 10 #define SkCanvasStack_DEFINED
(...skipping 11 matching lines...) Expand all
22 22
23 /* 23 /*
24 * The following add/remove canvas methods are overrides from SkNWayCanvas 24 * The following add/remove canvas methods are overrides from SkNWayCanvas
25 * that do not make sense in the context of our CanvasStack, but since we 25 * that do not make sense in the context of our CanvasStack, but since we
26 * can share most of the other implementation of NWay we override those 26 * can share most of the other implementation of NWay we override those
27 * methods to be no-ops. 27 * methods to be no-ops.
28 */ 28 */
29 virtual void addCanvas(SkCanvas*) SK_OVERRIDE { SkDEBUGFAIL("Invalid Op"); } 29 virtual void addCanvas(SkCanvas*) SK_OVERRIDE { SkDEBUGFAIL("Invalid Op"); }
30 virtual void removeCanvas(SkCanvas*) SK_OVERRIDE { SkDEBUGFAIL("Invalid Op") ; } 30 virtual void removeCanvas(SkCanvas*) SK_OVERRIDE { SkDEBUGFAIL("Invalid Op") ; }
31 31
32 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; 32 protected:
33 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE;
33 34
34 protected:
35 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 35 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
36 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 36 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
37 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 37 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
38 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 38 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
39 39
40 private: 40 private:
41 void clipToZOrderedBounds(); 41 void clipToZOrderedBounds();
42 42
43 struct CanvasData { 43 struct CanvasData {
44 SkIPoint origin; 44 SkIPoint origin;
45 SkRegion requiredClip; 45 SkRegion requiredClip;
46 }; 46 };
47 47
48 SkTArray<CanvasData> fCanvasData; 48 SkTArray<CanvasData> fCanvasData;
49 49
50 typedef SkNWayCanvas INHERITED; 50 typedef SkNWayCanvas INHERITED;
51 }; 51 };
52 52
53 #endif 53 #endif
OLDNEW
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkCanvasStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698