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

Unified Diff: cc/paint/paint_op_buffer_unittest.cc

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
« no previous file with comments | « cc/paint/paint_op_buffer.h ('k') | cc/paint/paint_shader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/paint/paint_op_buffer_unittest.cc
diff --git a/cc/paint/paint_op_buffer_unittest.cc b/cc/paint/paint_op_buffer_unittest.cc
index 96869556e32833a3d14dcb35e073e61a7aad8e65..a6bcbb75f2073bb90ce2c62c6afc0270035f6c64 100644
--- a/cc/paint/paint_op_buffer_unittest.cc
+++ b/cc/paint/paint_op_buffer_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "cc/paint/paint_op_buffer.h"
+#include "base/memory/ptr_util.h"
#include "cc/paint/display_item_list.h"
#include "cc/test/skia_common.h"
#include "cc/test/test_skcanvas.h"
@@ -447,8 +448,9 @@ TEST(PaintOpBufferTest, DiscardableImagesTracking_OpWithFlags) {
PaintOpBuffer buffer;
PaintFlags flags;
sk_sp<SkImage> image = CreateDiscardableImage(gfx::Size(100, 100));
- flags.setShader(
- image->makeShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode));
+ flags.setShader(PaintShader::MakeImage(std::move(image),
+ SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode, nullptr));
buffer.push<DrawRectOp>(SkRect::MakeWH(100, 100), flags);
EXPECT_TRUE(buffer.HasDiscardableImages());
}
« no previous file with comments | « cc/paint/paint_op_buffer.h ('k') | cc/paint/paint_shader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698