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

Side by Side Diff: cc/test/layer_test_common.cc

Issue 1177033008: cc: Turn impl_side_painting and use_one_copy on in LayerTreeSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implon: fixwebkittests Created 5 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 unified diff | Download patch
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/layer_test_common.h" 5 #include "cc/test/layer_test_common.h"
6 6
7 #include "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 #include "cc/base/region.h" 8 #include "cc/base/region.h"
9 #include "cc/layers/append_quads_data.h" 9 #include "cc/layers/append_quads_data.h"
10 #include "cc/quads/draw_quad.h" 10 #include "cc/quads/draw_quad.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } else { 106 } else {
107 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString()); 107 EXPECT_NE(quad->rect.ToString(), quad->visible_rect.ToString());
108 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect)); 108 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect));
109 ++(*partially_occluded_count); 109 ++(*partially_occluded_count);
110 } 110 }
111 } 111 }
112 } 112 }
113 113
114 LayerTestCommon::LayerImplTest::LayerImplTest() 114 LayerTestCommon::LayerImplTest::LayerImplTest()
115 : client_(FakeLayerTreeHostClient::DIRECT_3D), 115 : client_(FakeLayerTreeHostClient::DIRECT_3D),
116 host_(FakeLayerTreeHost::Create(&client_)), 116 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_)),
117 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)), 117 root_layer_impl_(LayerImpl::Create(host_->host_impl()->active_tree(), 1)),
118 render_pass_(RenderPass::Create()) { 118 render_pass_(RenderPass::Create()) {
119 root_layer_impl_->SetHasRenderSurface(true); 119 root_layer_impl_->SetHasRenderSurface(true);
120 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); 120 scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d();
121 host_->host_impl()->InitializeRenderer(FakeOutputSurface::Create3d()); 121 host_->host_impl()->InitializeRenderer(FakeOutputSurface::Create3d());
122 } 122 }
123 123
124 LayerTestCommon::LayerImplTest::~LayerImplTest() {} 124 LayerTestCommon::LayerImplTest::~LayerImplTest() {}
125 125
126 void LayerTestCommon::LayerImplTest::CalcDrawProps( 126 void LayerTestCommon::LayerImplTest::CalcDrawProps(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 render_pass_->shared_quad_state_list.clear(); 177 render_pass_->shared_quad_state_list.clear();
178 178
179 surface_impl->AppendQuads( 179 surface_impl->AppendQuads(
180 render_pass_.get(), gfx::Transform(), 180 render_pass_.get(), gfx::Transform(),
181 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded), 181 Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded),
182 SimpleEnclosedRegion()), 182 SimpleEnclosedRegion()),
183 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1)); 183 SK_ColorBLACK, 1.f, nullptr, &data, RenderPassId(1, 1));
184 } 184 }
185 185
186 } // namespace cc 186 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698