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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 2928433003: cc: Add scaling for checkered images. (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
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 4b824ee798b076a1d9a0e9aecb9729f2ae01ae92..c740cfe313efe36a74f2d4165d54314b43d2bd47 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -7803,14 +7803,16 @@ class LayerTreeHostTestQueueImageDecode : public LayerTreeHostTest {
return;
first_ = false;
- image_ = PaintImage(PaintImage::GetNextId(),
- CreateDiscardableImage(gfx::Size(400, 400)));
+ image_ = DrawImage(PaintImage(PaintImage::GetNextId(),
+ CreateDiscardableImage(gfx::Size(400, 400))),
+ SkIRect::MakeWH(400, 400), kNone_SkFilterQuality,
+ SkMatrix::I(), gfx::ColorSpace());
auto callback =
base::Bind(&LayerTreeHostTestQueueImageDecode::ImageDecodeFinished,
base::Unretained(this));
// Schedule the decode twice for the same image.
- layer_tree_host()->QueueImageDecode(image_, callback);
- layer_tree_host()->QueueImageDecode(image_, callback);
+ layer_tree_host()->QueueImageDecode(image_.paint_image(), callback);
+ layer_tree_host()->QueueImageDecode(image_.paint_image(), callback);
}
void ReadyToCommitOnThread(LayerTreeHostImpl* impl) override {
@@ -7844,7 +7846,7 @@ class LayerTreeHostTestQueueImageDecode : public LayerTreeHostTest {
bool first_ = true;
bool one_commit_done_ = false;
int finished_decode_count_ = 0;
- PaintImage image_;
+ DrawImage image_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestQueueImageDecode);
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698