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

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

Issue 16160005: cc: Ignore offscreen tiles for activation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 7 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
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.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 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 11 matching lines...) Expand all
22 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id, pile)); 22 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id, pile));
23 } 23 }
24 24
25 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 25 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
26 OVERRIDE; 26 OVERRIDE;
27 virtual gfx::Size CalculateTileSize(gfx::Size content_bounds) OVERRIDE; 27 virtual gfx::Size CalculateTileSize(gfx::Size content_bounds) OVERRIDE;
28 28
29 using PictureLayerImpl::AddTiling; 29 using PictureLayerImpl::AddTiling;
30 using PictureLayerImpl::CleanUpTilingsOnActiveLayer; 30 using PictureLayerImpl::CleanUpTilingsOnActiveLayer;
31 using PictureLayerImpl::CanHaveTilings; 31 using PictureLayerImpl::CanHaveTilings;
32 using PictureLayerImpl::MarkVisibleResourcesAsRequired;
32 33
33 PictureLayerImpl* twin_layer() { return twin_layer_; } 34 PictureLayerImpl* twin_layer() { return twin_layer_; }
34 PictureLayerTilingSet* tilings() { return tilings_.get(); } 35 PictureLayerTilingSet* tilings() { return tilings_.get(); }
35 36
36 const Region& invalidation() const { return invalidation_; } 37 const Region& invalidation() const { return invalidation_; }
37 void set_invalidation(const Region& region) { invalidation_ = region; } 38 void set_invalidation(const Region& region) { invalidation_ = region; }
38 39
39 void set_fixed_tile_size(gfx::Size size) { fixed_tile_size_ = size; } 40 void set_fixed_tile_size(gfx::Size size) { fixed_tile_size_ = size; }
40 41
41 protected: 42 protected:
42 FakePictureLayerImpl( 43 FakePictureLayerImpl(
43 LayerTreeImpl* tree_impl, 44 LayerTreeImpl* tree_impl,
44 int id, 45 int id,
45 scoped_refptr<PicturePileImpl> pile); 46 scoped_refptr<PicturePileImpl> pile);
46 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); 47 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id);
47 48
48 private: 49 private:
49 gfx::Size fixed_tile_size_; 50 gfx::Size fixed_tile_size_;
50 }; 51 };
51 52
52 } // namespace cc 53 } // namespace cc
53 54
54 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 55 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698