| OLD | NEW |
| 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 CCTiledLayerImpl_h | 5 #ifndef CCTiledLayerImpl_h |
| 6 #define CCTiledLayerImpl_h | 6 #define CCTiledLayerImpl_h |
| 7 | 7 |
| 8 #include "cc/layer_impl.h" | 8 #include "cc/layer_impl.h" |
| 9 #include <public/WebTransformationMatrix.h> | 9 #include <public/WebTransformationMatrix.h> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 virtual ~TiledLayerImpl(); | 22 virtual ~TiledLayerImpl(); |
| 23 | 23 |
| 24 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; | 24 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; |
| 25 | 25 |
| 26 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; | 26 virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; |
| 27 | 27 |
| 28 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; | 28 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; |
| 29 | 29 |
| 30 void setSkipsDraw(bool skipsDraw) { m_skipsDraw = skipsDraw; } | 30 void setSkipsDraw(bool skipsDraw) { m_skipsDraw = skipsDraw; } |
| 31 void setTilingData(const LayerTilingData& tiler); | 31 void setTilingData(const LayerTilingData& tiler); |
| 32 void pushTileProperties(int, int, ResourceProvider::ResourceId, const IntRec
t& opaqueRect, bool contentsSwizzled); | 32 void pushTileProperties(int, int, ResourceProvider::ResourceId, const gfx::R
ect& opaqueRect, bool contentsSwizzled); |
| 33 void pushInvalidTile(int, int); | 33 void pushInvalidTile(int, int); |
| 34 | 34 |
| 35 virtual Region visibleContentOpaqueRegion() const OVERRIDE; | 35 virtual Region visibleContentOpaqueRegion() const OVERRIDE; |
| 36 virtual void didLoseContext() OVERRIDE; | 36 virtual void didLoseContext() OVERRIDE; |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 explicit TiledLayerImpl(int id); | 39 explicit TiledLayerImpl(int id); |
| 40 // Exposed for testing. | 40 // Exposed for testing. |
| 41 bool hasTileAt(int, int) const; | 41 bool hasTileAt(int, int) const; |
| 42 bool hasResourceIdForTileAt(int, int) const; | 42 bool hasResourceIdForTileAt(int, int) const; |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 | 45 |
| 46 virtual const char* layerTypeAsString() const OVERRIDE; | 46 virtual const char* layerTypeAsString() const OVERRIDE; |
| 47 | 47 |
| 48 DrawableTile* tileAt(int, int) const; | 48 DrawableTile* tileAt(int, int) const; |
| 49 DrawableTile* createTile(int, int); | 49 DrawableTile* createTile(int, int); |
| 50 | 50 |
| 51 bool m_skipsDraw; | 51 bool m_skipsDraw; |
| 52 | 52 |
| 53 scoped_ptr<LayerTilingData> m_tiler; | 53 scoped_ptr<LayerTilingData> m_tiler; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } | 56 } |
| 57 | 57 |
| 58 #endif // CCTiledLayerImpl_h | 58 #endif // CCTiledLayerImpl_h |
| OLD | NEW |