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

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

Issue 448303002: Use custom ListContainer to allocate DrawQuads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perftest
Patch Set: fix rebase Created 6 years, 3 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 29 matching lines...) Expand all
40 // in the active tree. 40 // in the active tree.
41 PictureLayerImpl* picture_layer = static_cast<PictureLayerImpl*>( 41 PictureLayerImpl* picture_layer = static_cast<PictureLayerImpl*>(
42 host_impl->active_tree()->root_layer()->child_at(0)); 42 host_impl->active_tree()->root_layer()->child_at(0));
43 43
44 MockOcclusionTracker<LayerImpl> occlusion_tracker; 44 MockOcclusionTracker<LayerImpl> occlusion_tracker;
45 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); 45 scoped_ptr<RenderPass> render_pass = RenderPass::Create();
46 46
47 AppendQuadsData data; 47 AppendQuadsData data;
48 picture_layer->AppendQuads(render_pass.get(), occlusion_tracker, &data); 48 picture_layer->AppendQuads(render_pass.get(), occlusion_tracker, &data);
49 49
50 for (size_t i = 0; i < render_pass->quad_list.size(); ++i) 50 for (QuadList::Iterator iter = render_pass->quad_list.begin();
51 EXPECT_EQ(render_pass->quad_list[i]->material, DrawQuad::PICTURE_CONTENT); 51 iter != render_pass->quad_list.end();
52 ++iter)
53 EXPECT_EQ(iter->material, DrawQuad::PICTURE_CONTENT);
52 54
53 // Triggers pixel readback and ends the test. 55 // Triggers pixel readback and ends the test.
54 LayerTreePixelTest::SwapBuffersOnThread(host_impl, result); 56 LayerTreePixelTest::SwapBuffersOnThread(host_impl, result);
55 } 57 }
56 58
57 void RunOnDemandRasterPixelTest(); 59 void RunOnDemandRasterPixelTest();
58 }; 60 };
59 61
60 class BlueYellowLayerClient : public ContentLayerClient { 62 class BlueYellowLayerClient : public ContentLayerClient {
61 public: 63 public:
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 124
123 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, 125 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced,
124 RasterPictureLayer) { 126 RasterPictureLayer) {
125 RunOnDemandRasterPixelTest(); 127 RunOnDemandRasterPixelTest();
126 } 128 }
127 129
128 } // namespace 130 } // namespace
129 } // namespace cc 131 } // namespace cc
130 132
131 #endif // OS_ANDROID 133 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698