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

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

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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/core/SkBitmapDevice.h ('k') | include/core/SkDevice.h » ('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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #ifndef SkCanvas_DEFINED 10 #ifndef SkCanvas_DEFINED
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 SK_DECLARE_INST_COUNT(SkCanvas) 50 SK_DECLARE_INST_COUNT(SkCanvas)
51 51
52 SkCanvas(); 52 SkCanvas();
53 53
54 /** Construct a canvas with the specified device to draw into. 54 /** Construct a canvas with the specified device to draw into.
55 55
56 @param device Specifies a device for the canvas to draw into. 56 @param device Specifies a device for the canvas to draw into.
57 */ 57 */
58 explicit SkCanvas(SkBaseDevice* device); 58 explicit SkCanvas(SkBaseDevice* device);
59 59
60 /** Deprecated - Construct a canvas with the specified bitmap to draw into. 60 /** Construct a canvas with the specified bitmap to draw into.
61 @param bitmap Specifies a bitmap for the canvas to draw into. Its 61 @param bitmap Specifies a bitmap for the canvas to draw into. Its
62 structure are copied to the canvas. 62 structure are copied to the canvas.
63 */ 63 */
64 explicit SkCanvas(const SkBitmap& bitmap); 64 explicit SkCanvas(const SkBitmap& bitmap);
65 virtual ~SkCanvas(); 65 virtual ~SkCanvas();
66 66
67 SkMetaData& getMetaData(); 67 SkMetaData& getMetaData();
68 68
69 /////////////////////////////////////////////////////////////////////////// 69 ///////////////////////////////////////////////////////////////////////////
70 70
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 kEmpty_ClipType = 0, 935 kEmpty_ClipType = 0,
936 kRect_ClipType, 936 kRect_ClipType,
937 kComplex_ClipType 937 kComplex_ClipType
938 }; 938 };
939 939
940 /** Returns a description of the total clip; may be cheaper than 940 /** Returns a description of the total clip; may be cheaper than
941 getting the clip and querying it directly. 941 getting the clip and querying it directly.
942 */ 942 */
943 ClipType getClipType() const; 943 ClipType getClipType() const;
944 944
945 /** Return the current device clip (concatenation of all clip calls). 945 /** DEPRECATED -- need to move this guy to private/friend
946 * Return the current device clip (concatenation of all clip calls).
946 * This does not account for the translate in any of the devices. 947 * This does not account for the translate in any of the devices.
947 * @return the current device clip (concatenation of all clip calls). 948 * @return the current device clip (concatenation of all clip calls).
948 *
949 * DEPRECATED -- call getClipDeviceBounds() instead.
950 */ 949 */
951 const SkRegion& getTotalClip() const; 950 const SkRegion& getTotalClip() const;
952 951
953 /** Return the clip stack. The clip stack stores all the individual 952 /** Return the clip stack. The clip stack stores all the individual
954 * clips organized by the save/restore frame in which they were 953 * clips organized by the save/restore frame in which they were
955 * added. 954 * added.
956 * @return the current clip stack ("list" of individual clip elements) 955 * @return the current clip stack ("list" of individual clip elements)
957 */ 956 */
958 const SkClipStack* getClipStack() const { 957 const SkClipStack* getClipStack() const {
959 return &fClipStack; 958 return &fClipStack;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 1026
1028 // Called by child classes that override clipPath and clipRRect to only 1027 // Called by child classes that override clipPath and clipRRect to only
1029 // track fast conservative clip bounds, rather than exact clips. 1028 // track fast conservative clip bounds, rather than exact clips.
1030 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op, 1029 bool updateClipConservativelyUsingBounds(const SkRect&, SkRegion::Op,
1031 bool inverseFilled); 1030 bool inverseFilled);
1032 1031
1033 // notify our surface (if we have one) that we are about to draw, so it 1032 // notify our surface (if we have one) that we are about to draw, so it
1034 // can perform copy-on-write or invalidate any cached images 1033 // can perform copy-on-write or invalidate any cached images
1035 void predrawNotify(); 1034 void predrawNotify();
1036 1035
1037 /** DEPRECATED -- use constructor(device) 1036 /**
1038 1037 DEPRECATED -- need to remove when subclass stop relying on it.
1039 Marked as 'protected' to avoid new clients using this before we can 1038 Marked as 'protected' to avoid new clients using this before we can
1040 completely remove it. 1039 completely remove it.
1041 1040
1042 Specify a device for this canvas to draw into. If it is not null, its 1041 Specify a device for this canvas to draw into. If it is not null, its
1043 reference count is incremented. If the canvas was already holding a 1042 reference count is incremented. If the canvas was already holding a
1044 device, its reference count is decremented. The new device is returned. 1043 device, its reference count is decremented. The new device is returned.
1045 */ 1044 */
1046 virtual SkBaseDevice* setDevice(SkBaseDevice* device); 1045 virtual SkBaseDevice* setDevice(SkBaseDevice* device);
1047 1046
1048 private: 1047 private:
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 if (NULL != fCanvas) { 1189 if (NULL != fCanvas) {
1191 fCanvas->endCommentGroup(); 1190 fCanvas->endCommentGroup();
1192 } 1191 }
1193 } 1192 }
1194 1193
1195 private: 1194 private:
1196 SkCanvas* fCanvas; 1195 SkCanvas* fCanvas;
1197 }; 1196 };
1198 1197
1199 #endif 1198 #endif
OLDNEW
« no previous file with comments | « include/core/SkBitmapDevice.h ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698