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

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

Issue 1849703003: sk_sp for SkCanvas::drawAnnotation() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 * 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 * Send an "annotation" to the canvas. The annotation is a key/value pair, where the key is 1134 * Send an "annotation" to the canvas. The annotation is a key/value pair, where the key is
1135 * a null-terminated utf8 string, and the value is a blob of data stored in an SkData 1135 * a null-terminated utf8 string, and the value is a blob of data stored in an SkData
1136 * (which may be null). The annotation is associated with the specified rec tangle. 1136 * (which may be null). The annotation is associated with the specified rec tangle.
1137 * 1137 *
1138 * The caller still retains its ownership of the data (if any). 1138 * The caller still retains its ownership of the data (if any).
1139 * 1139 *
1140 * Note: on may canvas types, this information is ignored, but some canvase s (e.g. recording 1140 * Note: on may canvas types, this information is ignored, but some canvase s (e.g. recording
1141 * a picture or drawing to a PDF document) will pass on this information. 1141 * a picture or drawing to a PDF document) will pass on this information.
1142 */ 1142 */
1143 void drawAnnotation(const SkRect&, const char key[], SkData* value); 1143 void drawAnnotation(const SkRect&, const char key[], SkData* value);
1144 void drawAnnotation(const SkRect& rect, const char key[], const sk_sp<SkData >& value) {
1145 this->drawAnnotation(rect, key, value.get());
1146 }
1144 1147
1145 ////////////////////////////////////////////////////////////////////////// 1148 //////////////////////////////////////////////////////////////////////////
1146 #ifdef SK_INTERNAL 1149 #ifdef SK_INTERNAL
1147 #ifndef SK_SUPPORT_LEGACY_DRAWFILTER 1150 #ifndef SK_SUPPORT_LEGACY_DRAWFILTER
1148 #define SK_SUPPORT_LEGACY_DRAWFILTER 1151 #define SK_SUPPORT_LEGACY_DRAWFILTER
1149 #endif 1152 #endif
1150 #endif 1153 #endif
1151 1154
1152 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER 1155 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER
1153 /** Get the current filter object. The filter's reference count is not 1156 /** Get the current filter object. The filter's reference count is not
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 1569
1567 class SkCanvasClipVisitor { 1570 class SkCanvasClipVisitor {
1568 public: 1571 public:
1569 virtual ~SkCanvasClipVisitor(); 1572 virtual ~SkCanvasClipVisitor();
1570 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1573 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1571 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1574 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1572 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1575 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1573 }; 1576 };
1574 1577
1575 #endif 1578 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698