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

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

Issue 343653004: cc: Don't add new tilings while syncing a tiling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: managetilingsinsync: perftest 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 | Annotate | Revision Log
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 using PictureLayerImpl::AddTiling; 43 using PictureLayerImpl::AddTiling;
44 using PictureLayerImpl::CleanUpTilingsOnActiveLayer; 44 using PictureLayerImpl::CleanUpTilingsOnActiveLayer;
45 using PictureLayerImpl::CanHaveTilings; 45 using PictureLayerImpl::CanHaveTilings;
46 using PictureLayerImpl::MarkVisibleResourcesAsRequired; 46 using PictureLayerImpl::MarkVisibleResourcesAsRequired;
47 using PictureLayerImpl::DoPostCommitInitializationIfNeeded; 47 using PictureLayerImpl::DoPostCommitInitializationIfNeeded;
48 using PictureLayerImpl::MinimumContentsScale; 48 using PictureLayerImpl::MinimumContentsScale;
49 using PictureLayerImpl::SanityCheckTilingState; 49 using PictureLayerImpl::SanityCheckTilingState;
50 50
51 using PictureLayerImpl::UpdateIdealScales; 51 using PictureLayerImpl::UpdateIdealScales;
52 using PictureLayerImpl::MaximumTilingContentsScale; 52 using PictureLayerImpl::MaximumTilingContentsScale;
53 using PictureLayerImpl::ManageTilings;
54 53
55 void SetNeedsPostCommitInitialization() { 54 void SetNeedsPostCommitInitialization() {
56 needs_post_commit_initialization_ = true; 55 needs_post_commit_initialization_ = true;
57 } 56 }
58 57
59 bool needs_post_commit_initialization() const { 58 bool needs_post_commit_initialization() const {
60 return needs_post_commit_initialization_; 59 return needs_post_commit_initialization_;
61 } 60 }
62 61
63 float raster_page_scale() const { return raster_page_scale_; } 62 float raster_page_scale() const { return raster_page_scale_; }
(...skipping 23 matching lines...) Expand all
87 } 86 }
88 87
89 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } 88 void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; }
90 89
91 void CreateDefaultTilingsAndTiles(); 90 void CreateDefaultTilingsAndTiles();
92 void SetAllTilesVisible(); 91 void SetAllTilesVisible();
93 void SetAllTilesReady(); 92 void SetAllTilesReady();
94 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling); 93 void SetAllTilesReadyInTiling(PictureLayerTiling* tiling);
95 void ResetAllTilesPriorities(); 94 void ResetAllTilesPriorities();
96 95
97 void ScaleAndManageTilings(bool animating_transform_to_screen,
98 float maximum_animation_contents_scale) {
99 if (CanHaveTilings()) {
100 UpdateIdealScales();
101 ManageTilings(animating_transform_to_screen,
102 maximum_animation_contents_scale);
103 }
104 }
105
106 protected: 96 protected:
107 FakePictureLayerImpl( 97 FakePictureLayerImpl(
108 LayerTreeImpl* tree_impl, 98 LayerTreeImpl* tree_impl,
109 int id, 99 int id,
110 scoped_refptr<PicturePileImpl> pile); 100 scoped_refptr<PicturePileImpl> pile);
111 FakePictureLayerImpl(LayerTreeImpl* tree_impl, 101 FakePictureLayerImpl(LayerTreeImpl* tree_impl,
112 int id, 102 int id,
113 scoped_refptr<PicturePileImpl> pile, 103 scoped_refptr<PicturePileImpl> pile,
114 const gfx::Size& layer_bounds); 104 const gfx::Size& layer_bounds);
115 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); 105 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id);
116 106
117 private: 107 private:
118 gfx::Size fixed_tile_size_; 108 gfx::Size fixed_tile_size_;
119 109
120 size_t append_quads_count_; 110 size_t append_quads_count_;
121 }; 111 };
122 112
123 } // namespace cc 113 } // namespace cc
124 114
125 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 115 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698