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

Side by Side Diff: src/image/SkSurface_Base.h

Issue 14263017: Cleanup: Removing unnecessary args/complexity in SkSurface_Base and friends (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.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 2012 Google Inc. 2 * Copyright 2012 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 SkSurface_Base_DEFINED 8 #ifndef SkSurface_Base_DEFINED
9 #define SkSurface_Base_DEFINED 9 #define SkSurface_Base_DEFINED
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 */ 44 */
45 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); 45 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*);
46 46
47 /** 47 /**
48 * If the surface is about to change, we call this so that our subclass 48 * If the surface is about to change, we call this so that our subclass
49 * can optionally fork their backend (copy-on-write) in case it was 49 * can optionally fork their backend (copy-on-write) in case it was
50 * being shared with the cachedImage. 50 * being shared with the cachedImage.
51 * 51 *
52 * The default implementation does nothing. 52 * The default implementation does nothing.
53 */ 53 */
54 virtual void onCopyOnWrite(SkImage* cachedImage, SkCanvas*) = 0; 54 virtual void onCopyOnWrite() = 0;
55 55
56 inline SkCanvas* getCachedCanvas(); 56 inline SkCanvas* getCachedCanvas();
57 inline SkImage* getCachedImage(); 57 inline SkImage* getCachedImage();
58 58
59 // called by SkSurface to compute a new genID 59 // called by SkSurface to compute a new genID
60 uint32_t newGenerationID(); 60 uint32_t newGenerationID();
61 61
62 private: 62 private:
63 SkCanvas* fCachedCanvas; 63 SkCanvas* fCachedCanvas;
64 SkImage* fCachedImage; 64 SkImage* fCachedImage;
65 65
66 void aboutToDraw(SkCanvas*); 66 void aboutToDraw();
67 friend class SkCanvas; 67 friend class SkCanvas;
68 friend class SkSurface; 68 friend class SkSurface;
69 69
70 inline void installIntoCanvasForDirtyNotification(); 70 inline void installIntoCanvasForDirtyNotification();
71 71
72 typedef SkSurface INHERITED; 72 typedef SkSurface INHERITED;
73 }; 73 };
74 74
75 #endif 75 #endif
OLDNEW
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698