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

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/append_quads_data.h" 5 #include "cc/layers/append_quads_data.h"
6 #include "cc/layers/content_layer_client.h" 6 #include "cc/layers/content_layer_client.h"
7 #include "cc/layers/picture_layer.h" 7 #include "cc/layers/picture_layer.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/quads/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 #include "cc/test/layer_tree_pixel_test.h" 10 #include "cc/test/layer_tree_pixel_test.h"
(...skipping 24 matching lines...) Expand all
35 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override { 35 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
36 // Find the PictureLayerImpl ask it to append quads to check their material. 36 // Find the PictureLayerImpl ask it to append quads to check their material.
37 // The PictureLayerImpl is assumed to be the first child of the root layer 37 // The PictureLayerImpl is assumed to be the first child of the root layer
38 // in the active tree. 38 // in the active tree.
39 PictureLayerImpl* picture_layer = static_cast<PictureLayerImpl*>( 39 PictureLayerImpl* picture_layer = static_cast<PictureLayerImpl*>(
40 host_impl->active_tree()->root_layer()->child_at(0)); 40 host_impl->active_tree()->root_layer()->child_at(0));
41 41
42 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); 42 scoped_ptr<RenderPass> render_pass = RenderPass::Create();
43 43
44 AppendQuadsData data; 44 AppendQuadsData data;
45 picture_layer->AppendQuads(render_pass.get(), Occlusion(), &data); 45 picture_layer->AppendQuads(render_pass.get(), &data);
46 46
47 for (const auto& quad : render_pass->quad_list) 47 for (const auto& quad : render_pass->quad_list)
48 EXPECT_EQ(quad->material, DrawQuad::PICTURE_CONTENT); 48 EXPECT_EQ(quad->material, DrawQuad::PICTURE_CONTENT);
49 49
50 // Triggers pixel readback and ends the test. 50 // Triggers pixel readback and ends the test.
51 LayerTreePixelTest::SwapBuffersOnThread(host_impl, result); 51 LayerTreePixelTest::SwapBuffersOnThread(host_impl, result);
52 } 52 }
53 53
54 void RunOnDemandRasterPixelTest(); 54 void RunOnDemandRasterPixelTest();
55 }; 55 };
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) { 109 TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) {
110 RunOnDemandRasterPixelTest(); 110 RunOnDemandRasterPixelTest();
111 } 111 }
112 112
113 } // namespace 113 } // namespace
114 } // namespace cc 114 } // namespace cc
115 115
116 #endif // OS_ANDROID 116 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_filters.cc ('k') | cc/trees/layer_tree_host_pixeltest_readback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698