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

Unified Diff: ui/gfx/skia_util.h

Issue 1831883002: Use sk_sp-based shader creation APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/skia_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_util.h
diff --git a/ui/gfx/skia_util.h b/ui/gfx/skia_util.h
index 1953e635c25b69163ca658e974e0dc7e50517a3e..cf807ca36b1f3d437b1a34cfa0b6e1f8e94539b2 100644
--- a/ui/gfx/skia_util.h
+++ b/ui/gfx/skia_util.h
@@ -54,13 +54,13 @@ GFX_EXPORT void TransformToFlattenedSkMatrix(const gfx::Transform& transform,
// TODO(pkotwicz): Allow shader's local matrix to be changed after the shader
// is created.
//
-GFX_EXPORT skia::RefPtr<SkShader> CreateImageRepShader(
+GFX_EXPORT sk_sp<SkShader> CreateImageRepShader(
const gfx::ImageSkiaRep& image_rep,
SkShader::TileMode tile_mode,
const SkMatrix& local_matrix);
// Creates a bitmap shader for the image rep with the passed in scale factor.
-GFX_EXPORT skia::RefPtr<SkShader> CreateImageRepShaderForScale(
+GFX_EXPORT sk_sp<SkShader> CreateImageRepShaderForScale(
const gfx::ImageSkiaRep& image_rep,
SkShader::TileMode tile_mode,
const SkMatrix& local_matrix,
@@ -68,10 +68,10 @@ GFX_EXPORT skia::RefPtr<SkShader> CreateImageRepShaderForScale(
// Creates a vertical gradient shader. The caller owns the shader.
// Example usage to avoid leaks:
-GFX_EXPORT skia::RefPtr<SkShader> CreateGradientShader(int start_point,
- int end_point,
- SkColor start_color,
- SkColor end_color);
+GFX_EXPORT sk_sp<SkShader> CreateGradientShader(int start_point,
+ int end_point,
+ SkColor start_color,
+ SkColor end_color);
// Creates a draw looper to generate |shadows|. The caller owns the draw looper.
// NULL is returned if |shadows| is empty since no draw looper is needed in
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/skia_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698