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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 376683004: Pass resourceless software mode in BeginFrameArgs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix accidental header modification Created 6 years, 5 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_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 1772b602439d599aa401627a4fccb0c23bfe8eb5..e7d6935a983942c4c197d08a2d58d5a419a9a68a 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -5568,8 +5568,14 @@ TEST_F(LayerTreeHostImplTest, ForcedDrawToSoftwareDeviceBasicRender) {
SetupScrollAndContentsLayers(gfx::Size(100, 100));
- output_surface->set_forced_draw_to_software_device(true);
- EXPECT_TRUE(output_surface->ForcedDrawToSoftwareDevice());
+ const gfx::Transform external_transform;
+ const gfx::Rect external_viewport;
+ const gfx::Rect external_clip;
+ const bool resourceless_software_draw = true;
+ host_impl_->SetExternalDrawConstraints(external_transform,
+ external_viewport,
+ external_clip,
+ resourceless_software_draw);
EXPECT_EQ(0, software_device->frames_began_);
EXPECT_EQ(0, software_device->frames_ended_);
@@ -5595,8 +5601,14 @@ TEST_F(LayerTreeHostImplTest,
EXPECT_TRUE(CreateHostImpl(DefaultSettings(),
scoped_ptr<OutputSurface>(output_surface)));
- output_surface->set_forced_draw_to_software_device(true);
- EXPECT_TRUE(output_surface->ForcedDrawToSoftwareDevice());
+ const gfx::Transform external_transform;
+ const gfx::Rect external_viewport;
+ const gfx::Rect external_clip;
+ const bool resourceless_software_draw = true;
+ host_impl_->SetExternalDrawConstraints(external_transform,
+ external_viewport,
+ external_clip,
+ resourceless_software_draw);
// SolidColorLayerImpl will be drawn.
scoped_ptr<SolidColorLayerImpl> root_layer =
@@ -6634,13 +6646,13 @@ TEST_F(LayerTreeHostImplTest, ExternalTransformReflectedInNextDraw) {
gfx::Transform external_transform;
const gfx::Rect external_viewport(layer_size);
const gfx::Rect external_clip(layer_size);
- const bool valid_for_tile_management = true;
+ const bool resourceless_software_draw = false;
LayerImpl* layer = SetupScrollAndContentsLayers(layer_size);
host_impl_->SetExternalDrawConstraints(external_transform,
external_viewport,
external_clip,
- valid_for_tile_management);
+ resourceless_software_draw);
DrawFrame();
EXPECT_TRANSFORMATION_MATRIX_EQ(
external_transform, layer->draw_properties().target_space_transform);
@@ -6649,7 +6661,7 @@ TEST_F(LayerTreeHostImplTest, ExternalTransformReflectedInNextDraw) {
host_impl_->SetExternalDrawConstraints(external_transform,
external_viewport,
external_clip,
- valid_for_tile_management);
+ resourceless_software_draw);
DrawFrame();
EXPECT_TRANSFORMATION_MATRIX_EQ(
external_transform, layer->draw_properties().target_space_transform);

Powered by Google App Engine
This is Rietveld 408576698