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

Side by Side Diff: cc/test/fake_picture_layer_impl.h

Issue 367833003: cc: Start using raster/eviction iterators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/tile_priority.h ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
6 #define CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 6 #define CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 virtual bool HasValidTilePriorities() const override; 49 virtual bool HasValidTilePriorities() const override;
50 void set_has_valid_tile_priorities(bool has_valid_priorities) { 50 void set_has_valid_tile_priorities(bool has_valid_priorities) {
51 has_valid_tile_priorities_ = has_valid_priorities; 51 has_valid_tile_priorities_ = has_valid_priorities;
52 use_set_valid_tile_priorities_flag_ = true; 52 use_set_valid_tile_priorities_flag_ = true;
53 } 53 }
54 54
55 using PictureLayerImpl::AddTiling; 55 using PictureLayerImpl::AddTiling;
56 using PictureLayerImpl::CleanUpTilingsOnActiveLayer; 56 using PictureLayerImpl::CleanUpTilingsOnActiveLayer;
57 using PictureLayerImpl::CanHaveTilings; 57 using PictureLayerImpl::CanHaveTilings;
58 using PictureLayerImpl::MarkVisibleResourcesAsRequired;
59 using PictureLayerImpl::DoPostCommitInitializationIfNeeded; 58 using PictureLayerImpl::DoPostCommitInitializationIfNeeded;
60 using PictureLayerImpl::MinimumContentsScale; 59 using PictureLayerImpl::MinimumContentsScale;
61 using PictureLayerImpl::GetViewportForTilePriorityInContentSpace; 60 using PictureLayerImpl::GetViewportForTilePriorityInContentSpace;
62 using PictureLayerImpl::SanityCheckTilingState; 61 using PictureLayerImpl::SanityCheckTilingState;
63 using PictureLayerImpl::GetRecycledTwinLayer; 62 using PictureLayerImpl::GetRecycledTwinLayer;
64 63
65 using PictureLayerImpl::UpdateIdealScales; 64 using PictureLayerImpl::UpdateIdealScales;
66 using PictureLayerImpl::MaximumTilingContentsScale; 65 using PictureLayerImpl::MaximumTilingContentsScale;
67 66
68 void SetNeedsPostCommitInitialization() { 67 void SetNeedsPostCommitInitialization() {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); 103 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling);
105 void SetTileReady(Tile* tile); 104 void SetTileReady(Tile* tile);
106 void ResetAllTilesPriorities(); 105 void ResetAllTilesPriorities();
107 PictureLayerTilingSet* GetTilings() { return tilings_.get(); } 106 PictureLayerTilingSet* GetTilings() { return tilings_.get(); }
108 107
109 size_t release_resources_count() const { return release_resources_count_; } 108 size_t release_resources_count() const { return release_resources_count_; }
110 void reset_release_resources_count() { release_resources_count_ = 0; } 109 void reset_release_resources_count() { release_resources_count_ = 0; }
111 110
112 virtual void ReleaseResources() override; 111 virtual void ReleaseResources() override;
113 112
113 bool only_used_low_res_last_append_quads() const {
114 return only_used_low_res_last_append_quads_;
115 }
116
114 protected: 117 protected:
115 FakePictureLayerImpl( 118 FakePictureLayerImpl(
116 LayerTreeImpl* tree_impl, 119 LayerTreeImpl* tree_impl,
117 int id, 120 int id,
118 scoped_refptr<PicturePileImpl> pile); 121 scoped_refptr<PicturePileImpl> pile);
119 FakePictureLayerImpl(LayerTreeImpl* tree_impl, 122 FakePictureLayerImpl(LayerTreeImpl* tree_impl,
120 int id, 123 int id,
121 scoped_refptr<PicturePileImpl> pile, 124 scoped_refptr<PicturePileImpl> pile,
122 const gfx::Size& layer_bounds); 125 const gfx::Size& layer_bounds);
123 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); 126 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id);
124 127
125 private: 128 private:
126 gfx::Size fixed_tile_size_; 129 gfx::Size fixed_tile_size_;
127 130
128 size_t append_quads_count_; 131 size_t append_quads_count_;
129 size_t did_become_active_call_count_; 132 size_t did_become_active_call_count_;
130 bool has_valid_tile_priorities_; 133 bool has_valid_tile_priorities_;
131 bool use_set_valid_tile_priorities_flag_; 134 bool use_set_valid_tile_priorities_flag_;
132 size_t release_resources_count_; 135 size_t release_resources_count_;
133 }; 136 };
134 137
135 } // namespace cc 138 } // namespace cc
136 139
137 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 140 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/resources/tile_priority.h ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698