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

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

Issue 169023002: still trying to kill setDevice: rename to setRootDevice (better name) and make private (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « no previous file | src/core/SkCanvas.cpp » ('j') | src/pipe/SkGPipeWrite.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 1078
1079 // Called by child classes that override clipPath and clipRRect to only 1079 // Called by child classes that override clipPath and clipRRect to only
1080 // track fast conservative clip bounds, rather than exact clips. 1080 // track fast conservative clip bounds, rather than exact clips.
1081 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op, 1081 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op,
1082 bool inverseFilled); 1082 bool inverseFilled);
1083 1083
1084 // notify our surface (if we have one) that we are about to draw, so it 1084 // notify our surface (if we have one) that we are about to draw, so it
1085 // can perform copy-on-write or invalidate any cached images 1085 // can perform copy-on-write or invalidate any cached images
1086 void predrawNotify(); 1086 void predrawNotify();
1087 1087
1088 /**
1089 DEPRECATED -- need to remove when subclass stop relying on it.
1090 Marked as 'protected' to avoid new clients using this before we can
1091 completely remove it.
1092
1093 Specify a device for this canvas to draw into. If it is not null, its
1094 reference count is incremented. If the canvas was already holding a
1095 device, its reference count is decremented. The new device is returned.
1096 */
1097 virtual SkBaseDevice* setDevice(SkBaseDevice* device);
1098
1099 private: 1088 private:
1100 class MCRec; 1089 class MCRec;
1101 1090
1102 SkClipStack fClipStack; 1091 SkClipStack fClipStack;
1103 SkDeque fMCStack; 1092 SkDeque fMCStack;
1104 // points to top of stack 1093 // points to top of stack
1105 MCRec* fMCRec; 1094 MCRec* fMCRec;
1106 // the first N recs that can fit here mean we won't call malloc 1095 // the first N recs that can fit here mean we won't call malloc
1107 uint32_t fMCRecStorage[32]; 1096 uint32_t fMCRecStorage[32];
1108 1097
(...skipping 13 matching lines...) Expand all
1122 bool fDeviceCMDirty; // cleared by updateDeviceCMCache() 1111 bool fDeviceCMDirty; // cleared by updateDeviceCMCache()
1123 void updateDeviceCMCache(); 1112 void updateDeviceCMCache();
1124 1113
1125 friend class SkDrawIter; // needs setupDrawForLayerDevice() 1114 friend class SkDrawIter; // needs setupDrawForLayerDevice()
1126 friend class AutoDrawLooper; 1115 friend class AutoDrawLooper;
1127 1116
1128 SkBaseDevice* createLayerDevice(const SkImageInfo&); 1117 SkBaseDevice* createLayerDevice(const SkImageInfo&);
1129 1118
1130 SkBaseDevice* init(SkBaseDevice*); 1119 SkBaseDevice* init(SkBaseDevice*);
1131 1120
1121 /**
1122 * DEPRECATED
1123 *
1124 * Specify a device for this canvas to draw into. If it is not null, its
1125 * reference count is incremented. If the canvas was already holding a
1126 * device, its reference count is decremented. The new device is returned.
1127 */
1128 SkBaseDevice* setRootDevice(SkBaseDevice* device);
1129
1130
1132 // internal methods are not virtual, so they can safely be called by other 1131 // internal methods are not virtual, so they can safely be called by other
1133 // canvas apis, without confusing subclasses (like SkPictureRecording) 1132 // canvas apis, without confusing subclasses (like SkPictureRecording)
1134 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p aint); 1133 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p aint);
1135 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, 1134 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
1136 const SkRect& dst, const SkPaint* paint, 1135 const SkRect& dst, const SkPaint* paint,
1137 DrawBitmapRectFlags flags); 1136 DrawBitmapRectFlags flags);
1138 void internalDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 1137 void internalDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
1139 const SkRect& dst, const SkPaint* paint); 1138 const SkRect& dst, const SkPaint* paint);
1140 void internalDrawPaint(const SkPaint& paint); 1139 void internalDrawPaint(const SkPaint& paint);
1141 int internalSaveLayer(const SkRect* bounds, const SkPaint* paint, 1140 int internalSaveLayer(const SkRect* bounds, const SkPaint* paint,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 bool asROBitmap(SkBitmap*) const; 1284 bool asROBitmap(SkBitmap*) const;
1286 1285
1287 private: 1286 private:
1288 SkBitmap fBitmap; // used if peekPixels() fails 1287 SkBitmap fBitmap; // used if peekPixels() fails
1289 const void* fAddr; // NULL on failure 1288 const void* fAddr; // NULL on failure
1290 SkImageInfo fInfo; 1289 SkImageInfo fInfo;
1291 size_t fRowBytes; 1290 size_t fRowBytes;
1292 }; 1291 };
1293 1292
1294 #endif 1293 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | src/pipe/SkGPipeWrite.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698