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

Unified Diff: third_party/WebKit/Source/platform/graphics/Gradient.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
Index: third_party/WebKit/Source/platform/graphics/Gradient.h
diff --git a/third_party/WebKit/Source/platform/graphics/Gradient.h b/third_party/WebKit/Source/platform/graphics/Gradient.h
index b7a1c6a5c0fe6e84d61179b2b00a3438fbf256d5..8eb54c198ae7ba8bd60f7a5750eb4bb63b1eb8c8 100644
--- a/third_party/WebKit/Source/platform/graphics/Gradient.h
+++ b/third_party/WebKit/Source/platform/graphics/Gradient.h
@@ -102,16 +102,14 @@
using ColorBuffer = Vector<SkColor, 8>;
using OffsetBuffer = Vector<SkScalar, 8>;
- virtual std::unique_ptr<PaintShader> CreateShader(const ColorBuffer&,
- const OffsetBuffer&,
- SkShader::TileMode,
- uint32_t flags,
- const SkMatrix&,
- SkColor) const = 0;
+ virtual sk_sp<SkShader> CreateShader(const ColorBuffer&,
+ const OffsetBuffer&,
+ SkShader::TileMode,
+ uint32_t flags,
+ const SkMatrix&) const = 0;
private:
- std::unique_ptr<PaintShader> CreateShaderInternal(
- const SkMatrix& local_matrix);
+ sk_sp<PaintShader> CreateShaderInternal(const SkMatrix& local_matrix);
void SortStopsIfNecessary();
void FillSkiaStops(ColorBuffer&, OffsetBuffer&) const;
@@ -123,7 +121,7 @@
Vector<ColorStop, 2> stops_;
bool stops_sorted_;
- mutable std::unique_ptr<PaintShader> cached_shader_;
+ mutable sk_sp<PaintShader> cached_shader_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698