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

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

Issue 643993005: Remove limit on number of resources in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 1 month 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 10 matching lines...) Expand all
21 21
22 class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest { 22 class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest {
23 public: 23 public:
24 void InitializeSettings(LayerTreeSettings* settings) override { 24 void InitializeSettings(LayerTreeSettings* settings) override {
25 settings->impl_side_painting = true; 25 settings->impl_side_painting = true;
26 } 26 }
27 27
28 void BeginCommitOnThread(LayerTreeHostImpl* impl) override { 28 void BeginCommitOnThread(LayerTreeHostImpl* impl) override {
29 // Not enough memory available. Enforce on-demand rasterization. 29 // Not enough memory available. Enforce on-demand rasterization.
30 impl->SetMemoryPolicy( 30 impl->SetMemoryPolicy(
31 ManagedMemoryPolicy(1, gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING, 31 ManagedMemoryPolicy(1, gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING));
32 1000));
33 } 32 }
34 33
35 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override { 34 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
36 // Find the PictureLayerImpl ask it to append quads to check their material. 35 // 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 36 // The PictureLayerImpl is assumed to be the first child of the root layer
38 // in the active tree. 37 // in the active tree.
39 PictureLayerImpl* picture_layer = static_cast<PictureLayerImpl*>( 38 PictureLayerImpl* picture_layer = static_cast<PictureLayerImpl*>(
40 host_impl->active_tree()->root_layer()->child_at(0)); 39 host_impl->active_tree()->root_layer()->child_at(0));
41 40
42 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); 41 scoped_ptr<RenderPass> render_pass = RenderPass::Create();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 115
117 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced, 116 TEST_F(LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced,
118 RasterPictureLayer) { 117 RasterPictureLayer) {
119 RunOnDemandRasterPixelTest(); 118 RunOnDemandRasterPixelTest();
120 } 119 }
121 120
122 } // namespace 121 } // namespace
123 } // namespace cc 122 } // namespace cc
124 123
125 #endif // OS_ANDROID 124 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698