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

Unified Diff: cc/layers/picture_image_layer_impl_unittest.cc

Issue 14883003: cc: Fix impl-side painting flashing due to missing tiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | cc/layers/picture_layer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_image_layer_impl_unittest.cc
diff --git a/cc/layers/picture_image_layer_impl_unittest.cc b/cc/layers/picture_image_layer_impl_unittest.cc
index abedc8d33f2e320fa9bf58fdfd206832f85e27ac..ffe816fc19af568a00a9b50bb140eb129f1e2fd3 100644
--- a/cc/layers/picture_image_layer_impl_unittest.cc
+++ b/cc/layers/picture_image_layer_impl_unittest.cc
@@ -9,6 +9,7 @@
#include "cc/test/fake_output_surface.h"
#include "cc/test/fake_picture_layer_tiling_client.h"
#include "cc/test/impl_side_painting_settings.h"
+#include "cc/trees/layer_tree_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace cc {
@@ -41,6 +42,10 @@ class PictureImageLayerImplTest : public testing::Test {
return make_scoped_ptr(layer);
}
+ void UpdateDrawProperties() {
+ host_impl_.pending_tree()->UpdateDrawProperties();
+ }
+
private:
FakeImplProxy proxy_;
FakeLayerTreeHostImpl host_impl_;
@@ -67,12 +72,15 @@ TEST_F(PictureImageLayerImplTest, AreVisibleResourcesReady) {
layer->SetBounds(gfx::Size(100, 200));
layer->SetDrawsContent(true);
+ UpdateDrawProperties();
+
float contents_scale_x;
float contents_scale_y;
gfx::Size content_bounds;
layer->CalculateContentsScale(2.f, false,
&contents_scale_x, &contents_scale_y,
&content_bounds);
+ layer->UpdateTilePriorities();
EXPECT_TRUE(layer->AreVisibleResourcesReady());
}
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698