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

Side by Side Diff: skia/ext/platform_canvas.h

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fmalita review - deconstify sk_sp<>s 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_ 5 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_
6 #define SKIA_EXT_PLATFORM_CANVAS_H_ 6 #define SKIA_EXT_PLATFORM_CANVAS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 uint8_t* data, 82 uint8_t* data,
83 OnFailureType failure_type); 83 OnFailureType failure_type);
84 #endif 84 #endif
85 85
86 static inline SkCanvas* CreatePlatformCanvas(int width, 86 static inline SkCanvas* CreatePlatformCanvas(int width,
87 int height, 87 int height,
88 bool is_opaque) { 88 bool is_opaque) {
89 return CreatePlatformCanvas(width, height, is_opaque, 0, CRASH_ON_FAILURE); 89 return CreatePlatformCanvas(width, height, is_opaque, 0, CRASH_ON_FAILURE);
90 } 90 }
91 91
92 SK_API SkCanvas* CreateCanvas(const sk_sp<SkBaseDevice>& device, 92 SK_API SkCanvas* CreateCanvas(sk_sp<SkBaseDevice>& device,
f(malita) 2016/04/21 15:45:47 const sk_sp<SkBaseDevice>& ( We normally use eith
danakj 2016/04/21 23:37:21 If you're not going to ref the thing, take a T* in
tomhudson 2016/04/25 20:20:51 Done.
93 OnFailureType failure_type); 93 OnFailureType failure_type);
94 94
95 static inline SkCanvas* CreateBitmapCanvas(int width, 95 static inline SkCanvas* CreateBitmapCanvas(int width,
96 int height, 96 int height,
97 bool is_opaque) { 97 bool is_opaque) {
98 return CreatePlatformCanvas(width, height, is_opaque, 0, CRASH_ON_FAILURE); 98 return CreatePlatformCanvas(width, height, is_opaque, 0, CRASH_ON_FAILURE);
99 } 99 }
100 100
101 static inline SkCanvas* TryCreateBitmapCanvas(int width, 101 static inline SkCanvas* TryCreateBitmapCanvas(int width,
102 int height, 102 int height,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 SK_API bool IsPreviewMetafile(const SkCanvas& canvas); 172 SK_API bool IsPreviewMetafile(const SkCanvas& canvas);
173 173
174 // Returns the CGContext that backing the SkCanvas. 174 // Returns the CGContext that backing the SkCanvas.
175 // Returns NULL if none is bound. 175 // Returns NULL if none is bound.
176 SK_API CGContextRef GetBitmapContext(const SkCanvas& canvas); 176 SK_API CGContextRef GetBitmapContext(const SkCanvas& canvas);
177 #endif 177 #endif
178 178
179 } // namespace skia 179 } // namespace skia
180 180
181 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ 181 #endif // SKIA_EXT_PLATFORM_CANVAS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698