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

Unified Diff: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp

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/core/paint/InlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
index 83530023b7de60b2f0972dfeec8c79d7814e2a9a..176238ce8f14582d5b78a22b5682b951c4eb2ca5 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -23,7 +23,6 @@
#include "platform/graphics/paint/DrawingRecorder.h"
#include "platform/graphics/paint/PaintRecord.h"
#include "platform/graphics/paint/PaintRecorder.h"
-#include "platform/graphics/paint/PaintShader.h"
#include "platform/wtf/Optional.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
@@ -769,7 +768,7 @@
PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(color);
- flags.setShader(PaintShader::MakeLinearGradient(
+ flags.setShader(SkGradientShader::MakeLinear(
pts, colors, nullptr, ARRAY_SIZE(colors), SkShader::kClamp_TileMode));
PaintRecorder recorder;
recorder.beginRecording(kMarkerWidth, kMarkerHeight);
@@ -813,9 +812,9 @@
PaintFlags flags;
flags.setAntiAlias(true);
- flags.setShader(PaintShader::MakePaintRecord(
+ flags.setShader(WrapSkShader(MakePaintShaderRecord(
sk_ref_sp(marker), FloatRect(0, 0, kMarkerWidth, kMarkerHeight),
- SkShader::kRepeat_TileMode, SkShader::kClamp_TileMode, &local_matrix));
+ SkShader::kRepeat_TileMode, SkShader::kClamp_TileMode, &local_matrix)));
// Apply the origin translation as a global transform. This ensures that the
// shader local matrix depends solely on zoom => Skia can reuse the same
« no previous file with comments | « content/browser/web_contents/aura/shadow_layer_delegate.cc ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698