| 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 CC_TILED_LAYER_H_ | 5 #ifndef CC_TILED_LAYER_H_ |
| 6 #define CC_TILED_LAYER_H_ | 6 #define CC_TILED_LAYER_H_ |
| 7 | 7 |
| 8 #include "cc/cc_export.h" | 8 #include "cc/cc_export.h" |
| 9 #include "cc/contents_scaling_layer.h" | 9 #include "cc/contents_scaling_layer.h" |
| 10 #include "cc/layer_tiling_data.h" | 10 #include "cc/layer_tiling_data.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 virtual bool drawsContent() const OVERRIDE; | 28 virtual bool drawsContent() const OVERRIDE; |
| 29 | 29 |
| 30 virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE; | 30 virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE; |
| 31 | 31 |
| 32 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; | 32 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; |
| 33 | 33 |
| 34 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; | 34 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; |
| 35 | 35 |
| 36 virtual Region visibleContentOpaqueRegion() const OVERRIDE; | 36 virtual Region visibleContentOpaqueRegion() const OVERRIDE; |
| 37 | 37 |
| 38 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) OVERRIDE; | 38 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats*) OVERRIDE; |
| 39 | 39 |
| 40 protected: | 40 protected: |
| 41 TiledLayer(); | 41 TiledLayer(); |
| 42 virtual ~TiledLayer(); | 42 virtual ~TiledLayer(); |
| 43 | 43 |
| 44 void updateTileSizeAndTilingOption(); | 44 void updateTileSizeAndTilingOption(); |
| 45 void updateBounds(); | 45 void updateBounds(); |
| 46 | 46 |
| 47 // Exposed to subclasses for testing. | 47 // Exposed to subclasses for testing. |
| 48 void setTileSize(const gfx::Size&); | 48 void setTileSize(const gfx::Size&); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 74 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR
IDE; | 74 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR
IDE; |
| 75 | 75 |
| 76 void createTilerIfNeeded(); | 76 void createTilerIfNeeded(); |
| 77 void setTilingOption(TilingOption); | 77 void setTilingOption(TilingOption); |
| 78 | 78 |
| 79 bool tileOnlyNeedsPartialUpdate(UpdatableTile*); | 79 bool tileOnlyNeedsPartialUpdate(UpdatableTile*); |
| 80 bool tileNeedsBufferedUpdate(UpdatableTile*); | 80 bool tileNeedsBufferedUpdate(UpdatableTile*); |
| 81 | 81 |
| 82 void markOcclusionsAndRequestTextures(int left, int top, int right, int bott
om, const OcclusionTracker*); | 82 void markOcclusionsAndRequestTextures(int left, int top, int right, int bott
om, const OcclusionTracker*); |
| 83 | 83 |
| 84 bool updateTiles(int left, int top, int right, int bottom, ResourceUpdateQue
ue&, const OcclusionTracker*, RenderingStats&, bool& didPaint); | 84 bool updateTiles(int left, int top, int right, int bottom, ResourceUpdateQue
ue&, const OcclusionTracker*, RenderingStats*, bool& didPaint); |
| 85 bool haveTexturesForTiles(int left, int top, int right, int bottom, bool ign
oreOcclusions); | 85 bool haveTexturesForTiles(int left, int top, int right, int bottom, bool ign
oreOcclusions); |
| 86 gfx::Rect markTilesForUpdate(int left, int top, int right, int bottom, bool
ignoreOcclusions); | 86 gfx::Rect markTilesForUpdate(int left, int top, int right, int bottom, bool
ignoreOcclusions); |
| 87 void updateTileTextures(const gfx::Rect& paintRect, int left, int top, int r
ight, int bottom, ResourceUpdateQueue&, const OcclusionTracker*, RenderingStats&
); | 87 void updateTileTextures(const gfx::Rect& paintRect, int left, int top, int r
ight, int bottom, ResourceUpdateQueue&, const OcclusionTracker*, RenderingStats*
); |
| 88 void updateScrollPrediction(); | 88 void updateScrollPrediction(); |
| 89 | 89 |
| 90 UpdatableTile* tileAt(int, int) const; | 90 UpdatableTile* tileAt(int, int) const; |
| 91 UpdatableTile* createTile(int, int); | 91 UpdatableTile* createTile(int, int); |
| 92 | 92 |
| 93 bool isSmallAnimatedLayer() const; | 93 bool isSmallAnimatedLayer() const; |
| 94 | 94 |
| 95 unsigned m_textureFormat; | 95 unsigned m_textureFormat; |
| 96 bool m_skipsDraw; | 96 bool m_skipsDraw; |
| 97 bool m_failedUpdate; | 97 bool m_failedUpdate; |
| 98 | 98 |
| 99 // Used for predictive painting. | 99 // Used for predictive painting. |
| 100 gfx::Vector2d m_predictedScroll; | 100 gfx::Vector2d m_predictedScroll; |
| 101 gfx::Rect m_predictedVisibleRect; | 101 gfx::Rect m_predictedVisibleRect; |
| 102 gfx::Rect m_previousVisibleRect; | 102 gfx::Rect m_previousVisibleRect; |
| 103 gfx::Size m_previousContentBounds; | 103 gfx::Size m_previousContentBounds; |
| 104 | 104 |
| 105 TilingOption m_tilingOption; | 105 TilingOption m_tilingOption; |
| 106 scoped_ptr<LayerTilingData> m_tiler; | 106 scoped_ptr<LayerTilingData> m_tiler; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } | 109 } |
| 110 #endif // CC_TILED_LAYER_H_ | 110 #endif // CC_TILED_LAYER_H_ |
| OLD | NEW |