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

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

Issue 633773004: cc: Pass Occlusion instead of OcclusionTracker to LayerImpls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 1621
1622 class EvictionTestLayerImpl : public LayerImpl { 1622 class EvictionTestLayerImpl : public LayerImpl {
1623 public: 1623 public:
1624 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl, 1624 static scoped_ptr<EvictionTestLayerImpl> Create(LayerTreeImpl* tree_impl,
1625 int id) { 1625 int id) {
1626 return make_scoped_ptr(new EvictionTestLayerImpl(tree_impl, id)); 1626 return make_scoped_ptr(new EvictionTestLayerImpl(tree_impl, id));
1627 } 1627 }
1628 virtual ~EvictionTestLayerImpl() {} 1628 virtual ~EvictionTestLayerImpl() {}
1629 1629
1630 virtual void AppendQuads(RenderPass* render_pass, 1630 virtual void AppendQuads(RenderPass* render_pass,
1631 const OcclusionTracker<LayerImpl>& occlusion_tracker, 1631 const Occlusion& occlusion_in_content_space,
1632 AppendQuadsData* append_quads_data) override { 1632 AppendQuadsData* append_quads_data) override {
1633 ASSERT_TRUE(has_texture_); 1633 ASSERT_TRUE(has_texture_);
1634 ASSERT_NE(0u, layer_tree_impl()->resource_provider()->num_resources()); 1634 ASSERT_NE(0u, layer_tree_impl()->resource_provider()->num_resources());
1635 } 1635 }
1636 1636
1637 void SetHasTexture(bool has_texture) { has_texture_ = has_texture; } 1637 void SetHasTexture(bool has_texture) { has_texture_ = has_texture; }
1638 1638
1639 private: 1639 private:
1640 EvictionTestLayerImpl(LayerTreeImpl* tree_impl, int id) 1640 EvictionTestLayerImpl(LayerTreeImpl* tree_impl, int id)
1641 : LayerImpl(tree_impl, id), has_texture_(false) {} 1641 : LayerImpl(tree_impl, id), has_texture_(false) {}
(...skipping 3431 matching lines...) Expand 10 before | Expand all | Expand 10 after
5073 bool visible_; 5073 bool visible_;
5074 5074
5075 FakeContentLayerClient client_; 5075 FakeContentLayerClient client_;
5076 scoped_refptr<FakePictureLayer> picture_layer_; 5076 scoped_refptr<FakePictureLayer> picture_layer_;
5077 }; 5077 };
5078 5078
5079 // TODO(vmpstr): Enable with single thread impl-side painting. 5079 // TODO(vmpstr): Enable with single thread impl-side painting.
5080 MULTI_THREAD_TEST_F(LayerTreeHostTestActivateOnInvisible); 5080 MULTI_THREAD_TEST_F(LayerTreeHostTestActivateOnInvisible);
5081 5081
5082 } // namespace cc 5082 } // 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