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

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

Issue 312553006: remove SkBounder -- unused and unloved (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
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 15 matching lines...) Expand all
26 //#define SK_SUPPORT_LEGACY_GETTOTALCLIP 26 //#define SK_SUPPORT_LEGACY_GETTOTALCLIP
27 //#define SK_SUPPORT_LEGACY_GETTOPDEVICE 27 //#define SK_SUPPORT_LEGACY_GETTOPDEVICE
28 28
29 //#define SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL 29 //#define SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL
30 #ifdef SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL 30 #ifdef SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL
31 #define SK_LEGACY_DRAWTEXT_VIRTUAL virtual 31 #define SK_LEGACY_DRAWTEXT_VIRTUAL virtual
32 #else 32 #else
33 #define SK_LEGACY_DRAWTEXT_VIRTUAL 33 #define SK_LEGACY_DRAWTEXT_VIRTUAL
34 #endif 34 #endif
35 35
36 #ifdef SK_SUPPORT_LEGACY_BOUNDER
scroggo 2014/06/03 13:52:59 Does anyone need this? (Sorry I keep complaining a
reed1 2014/06/03 17:38:49 This was added before you confirmed that Android d
36 class SkBounder; 37 class SkBounder;
38 #endif
39
37 class SkBaseDevice; 40 class SkBaseDevice;
38 class SkDraw; 41 class SkDraw;
39 class SkDrawFilter; 42 class SkDrawFilter;
40 class SkMetaData; 43 class SkMetaData;
41 class SkPicture; 44 class SkPicture;
42 class SkRRect; 45 class SkRRect;
43 class SkSurface; 46 class SkSurface;
44 class SkSurface_Base; 47 class SkSurface_Base;
45 class GrContext; 48 class GrContext;
46 class GrRenderTarget; 49 class GrRenderTarget;
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 */ 1065 */
1063 void pushCull(const SkRect& cullRect); 1066 void pushCull(const SkRect& cullRect);
1064 1067
1065 /** 1068 /**
1066 * Terminates the current culling block, and restores the previous one (if any). 1069 * Terminates the current culling block, and restores the previous one (if any).
1067 */ 1070 */
1068 void popCull(); 1071 void popCull();
1069 1072
1070 ////////////////////////////////////////////////////////////////////////// 1073 //////////////////////////////////////////////////////////////////////////
1071 1074
1072 /** Get the current bounder object. 1075 #ifdef SK_SUPPORT_LEGACY_BOUNDER
1073 The bounder's reference count is unchaged. 1076 SkBounder* getBounder() const { return NULL; }
1074 @return the canva's bounder (or NULL). 1077 virtual SkBounder* setBounder(SkBounder*) { return NULL; }
1075 */ 1078 #endif
1076 SkBounder* getBounder() const { return fBounder; }
1077
1078 /** Set a new bounder (or NULL).
1079 Pass NULL to clear any previous bounder.
1080 As a convenience, the parameter passed is also returned.
1081 If a previous bounder exists, its reference count is decremented.
1082 If bounder is not NULL, its reference count is incremented.
1083 @param bounder the new bounder (or NULL) to be installed in the canvas
1084 @return the set bounder object
1085 */
1086 virtual SkBounder* setBounder(SkBounder* bounder);
1087 1079
1088 /** Get the current filter object. The filter's reference count is not 1080 /** Get the current filter object. The filter's reference count is not
1089 affected. The filter is saved/restored, just like the matrix and clip. 1081 affected. The filter is saved/restored, just like the matrix and clip.
1090 @return the canvas' filter (or NULL). 1082 @return the canvas' filter (or NULL).
1091 */ 1083 */
1092 SkDrawFilter* getDrawFilter() const; 1084 SkDrawFilter* getDrawFilter() const;
1093 1085
1094 /** Set the new filter (or NULL). Pass NULL to clear any existing filter. 1086 /** Set the new filter (or NULL). Pass NULL to clear any existing filter.
1095 As a convenience, the parameter is returned. If an existing filter 1087 As a convenience, the parameter is returned. If an existing filter
1096 exists, its refcnt is decrement. If the new filter is not null, its 1088 exists, its refcnt is decrement. If the new filter is not null, its
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 private: 1289 private:
1298 class MCRec; 1290 class MCRec;
1299 1291
1300 SkClipStack fClipStack; 1292 SkClipStack fClipStack;
1301 SkDeque fMCStack; 1293 SkDeque fMCStack;
1302 // points to top of stack 1294 // points to top of stack
1303 MCRec* fMCRec; 1295 MCRec* fMCRec;
1304 // the first N recs that can fit here mean we won't call malloc 1296 // the first N recs that can fit here mean we won't call malloc
1305 uint32_t fMCRecStorage[32]; 1297 uint32_t fMCRecStorage[32];
1306 1298
1307 SkBounder* fBounder;
1308 int fSaveLayerCount; // number of successful saveLayer calls 1299 int fSaveLayerCount; // number of successful saveLayer calls
1309 int fCullCount; // number of active culls 1300 int fCullCount; // number of active culls
1310 1301
1311 SkMetaData* fMetaData; 1302 SkMetaData* fMetaData;
1312 1303
1313 SkSurface_Base* fSurfaceBase; 1304 SkSurface_Base* fSurfaceBase;
1314 SkSurface_Base* getSurfaceBase() const { return fSurfaceBase; } 1305 SkSurface_Base* getSurfaceBase() const { return fSurfaceBase; }
1315 void setSurfaceBase(SkSurface_Base* sb) { 1306 void setSurfaceBase(SkSurface_Base* sb) {
1316 fSurfaceBase = sb; 1307 fSurfaceBase = sb;
1317 } 1308 }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 } 1509 }
1519 1510
1520 static inline SkCanvas::SaveFlags& operator|=(SkCanvas::SaveFlags& lhs, 1511 static inline SkCanvas::SaveFlags& operator|=(SkCanvas::SaveFlags& lhs,
1521 const SkCanvas::SaveFlags rhs) { 1512 const SkCanvas::SaveFlags rhs) {
1522 lhs = lhs | rhs; 1513 lhs = lhs | rhs;
1523 return lhs; 1514 return lhs;
1524 } 1515 }
1525 1516
1526 1517
1527 #endif 1518 #endif
OLDNEW
« no previous file with comments | « include/core/SkBounder.h ('k') | include/core/SkDraw.h » ('j') | samplecode/SampleApp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698