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

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

Issue 2893083002: cc: Move SkShader construction to a single spot in PaintShader (Closed)
Patch Set: update 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 176238ce8f14582d5b78a22b5682b951c4eb2ca5..83530023b7de60b2f0972dfeec8c79d7814e2a9a 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -23,6 +23,7 @@
#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"
@@ -768,7 +769,7 @@ sk_sp<PaintRecord> RecordMarker(DocumentMarker::MarkerType marker_type) {
PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(color);
- flags.setShader(SkGradientShader::MakeLinear(
+ flags.setShader(PaintShader::MakeLinearGradient(
pts, colors, nullptr, ARRAY_SIZE(colors), SkShader::kClamp_TileMode));
PaintRecorder recorder;
recorder.beginRecording(kMarkerWidth, kMarkerHeight);
@@ -812,9 +813,9 @@ void DrawDocumentMarker(GraphicsContext& context,
PaintFlags flags;
flags.setAntiAlias(true);
- flags.setShader(WrapSkShader(MakePaintShaderRecord(
+ flags.setShader(PaintShader::MakePaintRecord(
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