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

Side by Side Diff: include/utils/SkProxyCanvas.h

Issue 19240008: Export SkProxyCanvas and SkNWayCanvas for external use. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « include/utils/SkNWayCanvas.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 #ifndef SkProxyCanvas_DEFINED 8 #ifndef SkProxyCanvas_DEFINED
9 #define SkProxyCanvas_DEFINED 9 #define SkProxyCanvas_DEFINED
10 10
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 12
13 /** This class overrides all virtual methods on SkCanvas, and redirects them 13 /** This class overrides all virtual methods on SkCanvas, and redirects them
14 to a "proxy", another SkCanvas instance. It can be the basis for 14 to a "proxy", another SkCanvas instance. It can be the basis for
15 intercepting (and possibly modifying) calls to a canvas. 15 intercepting (and possibly modifying) calls to a canvas.
16 16
17 There must be a proxy installed before the proxycanvas can be used (i.e. 17 There must be a proxy installed before the proxycanvas can be used (i.e.
18 before its virtual methods can be called). 18 before its virtual methods can be called).
19 */ 19 */
20 class SkProxyCanvas : public SkCanvas { 20 class SK_API SkProxyCanvas : public SkCanvas {
21 public: 21 public:
22 SkProxyCanvas() : fProxy(NULL) {} 22 SkProxyCanvas() : fProxy(NULL) {}
23 SkProxyCanvas(SkCanvas* proxy); 23 SkProxyCanvas(SkCanvas* proxy);
24 virtual ~SkProxyCanvas(); 24 virtual ~SkProxyCanvas();
25 25
26 SkCanvas* getProxy() const { return fProxy; } 26 SkCanvas* getProxy() const { return fProxy; }
27 void setProxy(SkCanvas* proxy); 27 void setProxy(SkCanvas* proxy);
28 28
29 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE; 29 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE;
30 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, 30 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual SkBounder* setBounder(SkBounder* bounder) SK_OVERRIDE; 84 virtual SkBounder* setBounder(SkBounder* bounder) SK_OVERRIDE;
85 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; 85 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE;
86 86
87 private: 87 private:
88 SkCanvas* fProxy; 88 SkCanvas* fProxy;
89 89
90 typedef SkCanvas INHERITED; 90 typedef SkCanvas INHERITED;
91 }; 91 };
92 92
93 #endif 93 #endif
OLDNEW
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698