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

Unified Diff: content/browser/web_contents/aura/shadow_layer_delegate.cc

Issue 2893083002: cc: Move SkShader construction to a single spot in PaintShader (Closed)
Patch Set: update Created 3 years, 7 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: content/browser/web_contents/aura/shadow_layer_delegate.cc
diff --git a/content/browser/web_contents/aura/shadow_layer_delegate.cc b/content/browser/web_contents/aura/shadow_layer_delegate.cc
index 84ef3f68ae0e3898d7ca58d94682ca6b730f8f49..2c1cc448f2e79714c5cd8659b693b9917b02734e 100644
--- a/content/browser/web_contents/aura/shadow_layer_delegate.cc
+++ b/content/browser/web_contents/aura/shadow_layer_delegate.cc
@@ -45,9 +45,9 @@ void ShadowLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
gfx::Rect paint_rect = gfx::Rect(0, 0, kShadowThick,
layer_->bounds().height());
cc::PaintFlags flags;
- flags.setShader(cc::WrapSkShader(SkGradientShader::MakeLinear(
- points, kShadowColors, NULL, arraysize(points),
- SkShader::kRepeat_TileMode)));
+ flags.setShader(base::MakeUnique<cc::PaintShader>(
+ points, kShadowColors, nullptr, arraysize(points),
+ SkShader::kRepeat_TileMode));
ui::PaintRecorder recorder(context, layer_->size());
recorder.canvas()->DrawRect(paint_rect, flags);
}

Powered by Google App Engine
This is Rietveld 408576698