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

Unified Diff: ui/gfx/skia_paint_util.h

Issue 2928703005: Revert of cc: Move SkShader construction to a single spot in PaintShader (Closed)
Patch Set: Created 3 years, 6 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_paint_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_paint_util.h
diff --git a/ui/gfx/skia_paint_util.h b/ui/gfx/skia_paint_util.h
index 1d163437577ba77940879920ae3d509f1809daa8..f7e5d82de725715374a30c7f66783ea782b2cf60 100644
--- a/ui/gfx/skia_paint_util.h
+++ b/ui/gfx/skia_paint_util.h
@@ -5,7 +5,6 @@
#ifndef UI_GFX_SKIA_PAINT_UTIL_H_
#define UI_GFX_SKIA_PAINT_UTIL_H_
-#include <memory>
#include <vector>
#include "cc/paint/paint_shader.h"
@@ -26,25 +25,24 @@
// TODO(pkotwicz): Allow shader's local matrix to be changed after the shader
// is created.
//
-GFX_EXPORT std::unique_ptr<cc::PaintShader> CreateImageRepShader(
+GFX_EXPORT sk_sp<cc::PaintShader> CreateImageRepShader(
const gfx::ImageSkiaRep& image_rep,
- SkShader::TileMode tile_mode,
+ cc::PaintShader::TileMode tile_mode,
const SkMatrix& local_matrix);
// Creates a bitmap shader for the image rep with the passed in scale factor.
-GFX_EXPORT std::unique_ptr<cc::PaintShader> CreateImageRepShaderForScale(
+GFX_EXPORT sk_sp<cc::PaintShader> CreateImageRepShaderForScale(
const gfx::ImageSkiaRep& image_rep,
- SkShader::TileMode tile_mode,
+ cc::PaintShader::TileMode tile_mode,
const SkMatrix& local_matrix,
SkScalar scale);
// Creates a vertical gradient shader. The caller owns the shader.
// Example usage to avoid leaks:
-GFX_EXPORT std::unique_ptr<cc::PaintShader> CreateGradientShader(
- int start_point,
- int end_point,
- SkColor start_color,
- SkColor end_color);
+GFX_EXPORT sk_sp<cc::PaintShader> 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_paint_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698