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

Side by Side Diff: cc/tiled_layer_impl.h

Issue 12774006: cc: Chromify Layer and LayerImpl classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MoreAndroidCompilings Created 7 years, 9 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/tiled_layer.cc ('k') | cc/tiled_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 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 #ifndef CC_TILED_LAYER_IMPL_H_ 5 #ifndef CC_TILED_LAYER_IMPL_H_
6 #define CC_TILED_LAYER_IMPL_H_ 6 #define CC_TILED_LAYER_IMPL_H_
7 7
8 #include "cc/cc_export.h" 8 #include "cc/cc_export.h"
9 #include "cc/layer_impl.h" 9 #include "cc/layer_impl.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 class LayerTilingData; 13 class LayerTilingData;
14 class DrawableTile; 14 class DrawableTile;
15 15
16 class CC_EXPORT TiledLayerImpl : public LayerImpl { 16 class CC_EXPORT TiledLayerImpl : public LayerImpl {
17 public: 17 public:
18 static scoped_ptr<TiledLayerImpl> create(LayerTreeImpl* treeImpl, int id) 18 static scoped_ptr<TiledLayerImpl> Create(LayerTreeImpl* treeImpl, int id)
19 { 19 {
20 return make_scoped_ptr(new TiledLayerImpl(treeImpl, id)); 20 return make_scoped_ptr(new TiledLayerImpl(treeImpl, id));
21 } 21 }
22 virtual ~TiledLayerImpl(); 22 virtual ~TiledLayerImpl();
23 23
24 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl*) OVERRIDE; 24 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl*) OVERRIDE;
25 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; 25 virtual void PushPropertiesTo(LayerImpl*) OVERRIDE;
26 26
27 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; 27 virtual void AppendQuads(QuadSink* quad_sink,
28 AppendQuadsData* append_quads_data) OVERRIDE;
28 29
29 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; 30 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
30 31
31 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; 32 virtual void DumpLayerProperties(std::string*, int indent) const OVERRIDE;
32 33
33 void setSkipsDraw(bool skipsDraw) { m_skipsDraw = skipsDraw; } 34 void setSkipsDraw(bool skipsDraw) { m_skipsDraw = skipsDraw; }
34 void setTilingData(const LayerTilingData& tiler); 35 void setTilingData(const LayerTilingData& tiler);
35 void pushTileProperties(int, int, ResourceProvider::ResourceId, const gfx::R ect& opaqueRect, bool contentsSwizzled); 36 void pushTileProperties(int, int, ResourceProvider::ResourceId, const gfx::R ect& opaqueRect, bool contentsSwizzled);
36 void pushInvalidTile(int, int); 37 void pushInvalidTile(int, int);
37 38
38 virtual Region visibleContentOpaqueRegion() const OVERRIDE; 39 virtual Region VisibleContentOpaqueRegion() const OVERRIDE;
39 virtual void didLoseOutputSurface() OVERRIDE; 40 virtual void DidLoseOutputSurface() OVERRIDE;
40 41
41 protected: 42 protected:
42 TiledLayerImpl(LayerTreeImpl* treeImpl, int id); 43 TiledLayerImpl(LayerTreeImpl* treeImpl, int id);
43 // Exposed for testing. 44 // Exposed for testing.
44 bool hasTileAt(int, int) const; 45 bool hasTileAt(int, int) const;
45 bool hasResourceIdForTileAt(int, int) const; 46 bool hasResourceIdForTileAt(int, int) const;
46 47
47 virtual void getDebugBorderProperties(SkColor*, float* width) const OVERRIDE ; 48 virtual void GetDebugBorderProperties(SkColor*, float* width) const OVERRIDE ;
48 49
49 private: 50 private:
50 51
51 virtual const char* layerTypeAsString() const OVERRIDE; 52 virtual const char* LayerTypeAsString() const OVERRIDE;
52 53
53 DrawableTile* tileAt(int, int) const; 54 DrawableTile* tileAt(int, int) const;
54 DrawableTile* createTile(int, int); 55 DrawableTile* createTile(int, int);
55 56
56 bool m_skipsDraw; 57 bool m_skipsDraw;
57 58
58 scoped_ptr<LayerTilingData> m_tiler; 59 scoped_ptr<LayerTilingData> m_tiler;
59 }; 60 };
60 61
61 } 62 }
62 63
63 #endif // CC_TILED_LAYER_IMPL_H_ 64 #endif // CC_TILED_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/tiled_layer.cc ('k') | cc/tiled_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698