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

Unified Diff: cc/trees/layer_tree_host_pixeltest_blending.cc

Issue 2835373003: Plumb PaintImage to the PictureImageLayer. (Closed)
Patch Set: Created 3 years, 8 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: cc/trees/layer_tree_host_pixeltest_blending.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc
index 05f94594ae4fa67f13f81deed924f925fead6687..c39314ef3c06d243228074ff41e8749265c4142e 100644
--- a/cc/trees/layer_tree_host_pixeltest_blending.cc
+++ b/cc/trees/layer_tree_host_pixeltest_blending.cc
@@ -6,6 +6,7 @@
#include "cc/layers/picture_image_layer.h"
#include "cc/layers/solid_color_layer.h"
+#include "cc/paint/paint_image.h"
#include "cc/test/layer_tree_pixel_resource_test.h"
#include "cc/test/pixel_comparator.h"
#include "third_party/skia/include/core/SkImage.h"
@@ -145,7 +146,9 @@ class LayerTreeHostBlendingPixelTest : public LayerTreeHostPixelResourceTest {
scoped_refptr<PictureImageLayer> layer = PictureImageLayer::Create();
layer->SetIsDrawable(true);
layer->SetBounds(gfx::Size(width, height));
- layer->SetImage(backing_store->makeImageSnapshot());
+ layer->SetImage(PaintImage(backing_store->makeImageSnapshot(),
+ PaintImage::AnimationType::STATIC,
+ PaintImage::CompletionState::DONE));
return layer;
}
@@ -167,7 +170,9 @@ class LayerTreeHostBlendingPixelTest : public LayerTreeHostPixelResourceTest {
bounds.width() - kMaskOffset * 2,
bounds.height() - kMaskOffset * 2),
paint);
- mask->SetImage(surface->makeImageSnapshot());
+ mask->SetImage(PaintImage(surface->makeImageSnapshot(),
+ PaintImage::AnimationType::STATIC,
+ PaintImage::CompletionState::DONE));
layer->SetMaskLayer(mask.get());
}

Powered by Google App Engine
This is Rietveld 408576698