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

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

Issue 308193003: Removed QuadSink and MockQuadCuller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumLayerImpl
Patch Set: rebase Created 6 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/trees/layer_tree_host_pixeltest_on_demand_raster.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 }; 1652 };
1653 1653
1654 class EvictionTestLayerImpl : public LayerImpl { 1654 class EvictionTestLayerImpl : public LayerImpl {
1655 public: 1655 public:
1656 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl, 1656 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl,
1657 int id) { 1657 int id) {
1658 return make_scoped_ptr(new EvictionTestLayerImpl(tree_impl, id)); 1658 return make_scoped_ptr(new EvictionTestLayerImpl(tree_impl, id));
1659 } 1659 }
1660 virtual ~EvictionTestLayerImpl() {} 1660 virtual ~EvictionTestLayerImpl() {}
1661 1661
1662 virtual void AppendQuads(QuadSink* quad_sink, 1662 virtual void AppendQuads(RenderPass* render_pass,
1663 const OcclusionTracker<LayerImpl>& occlusion_tracker,
1663 AppendQuadsData* append_quads_data) OVERRIDE { 1664 AppendQuadsData* append_quads_data) OVERRIDE {
1664 ASSERT_TRUE(has_texture_); 1665 ASSERT_TRUE(has_texture_);
1665 ASSERT_NE(0u, layer_tree_impl()->resource_provider()->num_resources()); 1666 ASSERT_NE(0u, layer_tree_impl()->resource_provider()->num_resources());
1666 } 1667 }
1667 1668
1668 void SetHasTexture(bool has_texture) { has_texture_ = has_texture; } 1669 void SetHasTexture(bool has_texture) { has_texture_ = has_texture; }
1669 1670
1670 private: 1671 private:
1671 EvictionTestLayerImpl(LayerTreeImpl* tree_impl, int id) 1672 EvictionTestLayerImpl(LayerTreeImpl* tree_impl, int id)
1672 : LayerImpl(tree_impl, id), has_texture_(false) {} 1673 : LayerImpl(tree_impl, id), has_texture_(false) {}
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after
4625 } 4626 }
4626 } 4627 }
4627 4628
4628 virtual void AfterTest() OVERRIDE {} 4629 virtual void AfterTest() OVERRIDE {}
4629 4630
4630 FakeContentLayerClient client_; 4631 FakeContentLayerClient client_;
4631 scoped_ptr<FakeScopedUIResource> ui_resource_; 4632 scoped_ptr<FakeScopedUIResource> ui_resource_;
4632 }; 4633 };
4633 4634
4634 // This test is flaky, see http://crbug.com/386199 4635 // This test is flaky, see http://crbug.com/386199
4635 //MULTI_THREAD_TEST_F(LayerTreeHostTestHighResRequiredAfterEvictingUIResources); 4636 // MULTI_THREAD_TEST_F(LayerTreeHostTestHighResRequiredAfterEvictingUIResources)
4636 4637
4637 class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest { 4638 class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
4638 protected: 4639 protected:
4639 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { 4640 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
4640 settings->impl_side_painting = true; 4641 settings->impl_side_painting = true;
4641 4642
4642 EXPECT_FALSE(settings->gpu_rasterization_enabled); 4643 EXPECT_FALSE(settings->gpu_rasterization_enabled);
4643 EXPECT_FALSE(settings->gpu_rasterization_forced); 4644 EXPECT_FALSE(settings->gpu_rasterization_forced);
4644 } 4645 }
4645 4646
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
4893 const gfx::Size bounds_; 4894 const gfx::Size bounds_;
4894 FakeContentLayerClient client_; 4895 FakeContentLayerClient client_;
4895 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; 4896 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_;
4896 scoped_refptr<FakePictureLayer> picture_layer_; 4897 scoped_refptr<FakePictureLayer> picture_layer_;
4897 Layer* child_layer_; 4898 Layer* child_layer_;
4898 }; 4899 };
4899 4900
4900 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); 4901 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting);
4901 4902
4902 } // namespace cc 4903 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698