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

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

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile by including ContextProvider from output_surface_client.h 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/test/fake_output_surface.cc ('k') | cc/test/fake_picture_layer_impl.cc » ('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
11 namespace cc { 11 namespace cc {
12 12
13 class FakePictureLayerImpl : public PictureLayerImpl { 13 class FakePictureLayerImpl : public PictureLayerImpl {
14 public: 14 public:
15 static scoped_ptr<FakePictureLayerImpl> Create( 15 static scoped_ptr<FakePictureLayerImpl> Create(
16 LayerTreeImpl* tree_impl, int id) { 16 LayerTreeImpl* tree_impl, int id) {
17 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id)); 17 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id));
18 } 18 }
19 19
20 static scoped_ptr<FakePictureLayerImpl> CreateWithPile( 20 static scoped_ptr<FakePictureLayerImpl> CreateWithPile(
21 LayerTreeImpl* tree_impl, int id, scoped_refptr<PicturePileImpl> pile) { 21 LayerTreeImpl* tree_impl, int id, scoped_refptr<PicturePileImpl> pile) {
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 void AppendQuads(QuadSink* quad_sink,
28 AppendQuadsData* append_quads_data) OVERRIDE;
27 virtual gfx::Size CalculateTileSize(gfx::Size content_bounds) OVERRIDE; 29 virtual gfx::Size CalculateTileSize(gfx::Size content_bounds) OVERRIDE;
28 30
29 using PictureLayerImpl::AddTiling; 31 using PictureLayerImpl::AddTiling;
30 using PictureLayerImpl::CleanUpTilingsOnActiveLayer; 32 using PictureLayerImpl::CleanUpTilingsOnActiveLayer;
31 using PictureLayerImpl::CanHaveTilings; 33 using PictureLayerImpl::CanHaveTilings;
32 using PictureLayerImpl::MarkVisibleResourcesAsRequired; 34 using PictureLayerImpl::MarkVisibleResourcesAsRequired;
33 35
34 PictureLayerImpl* twin_layer() { return twin_layer_; } 36 PictureLayerImpl* twin_layer() { return twin_layer_; }
35 PictureLayerTilingSet* tilings() { return tilings_.get(); } 37 PictureLayerTilingSet* tilings() { return tilings_.get(); }
38 size_t append_quads_count() { return append_quads_count_; }
36 39
37 const Region& invalidation() const { return invalidation_; } 40 const Region& invalidation() const { return invalidation_; }
38 void set_invalidation(const Region& region) { invalidation_ = region; } 41 void set_invalidation(const Region& region) { invalidation_ = region; }
39 42
40 void set_fixed_tile_size(gfx::Size size) { fixed_tile_size_ = size; } 43 void set_fixed_tile_size(gfx::Size size) { fixed_tile_size_ = size; }
41 44
42 protected: 45 protected:
43 FakePictureLayerImpl( 46 FakePictureLayerImpl(
44 LayerTreeImpl* tree_impl, 47 LayerTreeImpl* tree_impl,
45 int id, 48 int id,
46 scoped_refptr<PicturePileImpl> pile); 49 scoped_refptr<PicturePileImpl> pile);
47 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id); 50 FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id);
48 51
49 private: 52 private:
50 gfx::Size fixed_tile_size_; 53 gfx::Size fixed_tile_size_;
54
55 size_t append_quads_count_;
51 }; 56 };
52 57
53 } // namespace cc 58 } // namespace cc
54 59
55 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_ 60 #endif // CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/fake_picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698