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

Unified Diff: cc/trees/layer_tree_host_unittest_damage.cc

Issue 279013002: Remove CompositeAndReadback from LayerTreeHost(Impl) and the Proxys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-cnr-lth-proxy-renderer: rebase-on-drawresult Created 6 years, 7 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/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_damage.cc
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index 33cd7ad7d4d8e84c268f3812626163ae7bc561af..eab8ed6b60ebe110bfc884ba6af5f65e0a2312e7 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -240,78 +240,6 @@ class LayerTreeHostDamageTestNoDamageDoesNotSwap
SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(
LayerTreeHostDamageTestNoDamageDoesNotSwap);
-class LayerTreeHostDamageTestNoDamageReadbackDoesDraw
- : public LayerTreeHostDamageTest {
- virtual void BeginTest() OVERRIDE {
- PostSetNeedsCommitToMainThread();
- }
-
- virtual void SetupTree() OVERRIDE {
- scoped_refptr<FakeContentLayer> root = FakeContentLayer::Create(&client_);
- root->SetBounds(gfx::Size(10, 10));
-
- // Most of the layer isn't visible.
- content_ = FakeContentLayer::Create(&client_);
- content_->SetBounds(gfx::Size(100, 100));
- root->AddChild(content_);
-
- layer_tree_host()->SetRootLayer(root);
- LayerTreeHostDamageTest::SetupTree();
- }
-
- virtual DrawResult PrepareToDrawOnThread(
- LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame_data,
- DrawResult draw_result) OVERRIDE {
- EXPECT_EQ(DRAW_SUCCESS, draw_result);
-
- int source_frame = host_impl->active_tree()->source_frame_number();
- switch (source_frame) {
- case 0:
- // The first frame draws and clears any damage.
- break;
- case 1: {
- // The second frame is a readback, we should have damage in the readback
- // rect, but not swap.
- RenderSurfaceImpl* root_surface =
- host_impl->active_tree()->root_layer()->render_surface();
- gfx::RectF root_damage =
- root_surface->damage_tracker()->current_damage_rect();
- root_damage.Intersect(root_surface->content_rect());
- EXPECT_TRUE(root_damage.Contains(gfx::Rect(3, 3, 1, 1)));
- break;
- }
- case 2:
- // CompositeAndReadback causes a follow-up commit.
- break;
- case 3:
- NOTREACHED();
- break;
- }
- return draw_result;
- }
-
- virtual void DidCommitAndDrawFrame() OVERRIDE {
- int next_frame = layer_tree_host()->source_frame_number();
- switch (next_frame) {
- case 1: {
- char pixels[4];
- layer_tree_host()->CompositeAndReadback(static_cast<void*>(&pixels),
- gfx::Rect(3, 3, 1, 1));
- EndTest();
- break;
- }
- }
- }
-
- virtual void AfterTest() OVERRIDE {}
-
- FakeContentLayerClient client_;
- scoped_refptr<FakeContentLayer> content_;
-};
-
-SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDamageTestNoDamageReadbackDoesDraw);
-
class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest {
virtual void BeginTest() OVERRIDE {
PostSetNeedsCommitToMainThread();
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698