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

Side by Side Diff: cc/tiled_layer.h

Issue 11794019: Avoid exposing gl bindings through cc public API headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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/thread_proxy.cc ('k') | cc/tiled_layer.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_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"
11 #include "cc/layer_updater.h"
12 11
13 namespace cc { 12 namespace cc {
13 class LayerUpdater;
14 class PrioritizedResourceManager;
15 class PrioritizedResource;
14 class UpdatableTile; 16 class UpdatableTile;
15 17
16 class CC_EXPORT TiledLayer : public ContentsScalingLayer { 18 class CC_EXPORT TiledLayer : public ContentsScalingLayer {
17 public: 19 public:
18 enum TilingOption { AlwaysTile, NeverTile, AutoTile }; 20 enum TilingOption { AlwaysTile, NeverTile, AutoTile };
19 21
20 virtual void setIsMask(bool) OVERRIDE; 22 virtual void setIsMask(bool) OVERRIDE;
21 23
22 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; 24 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
23 25
(...skipping 13 matching lines...) Expand all
37 39
38 protected: 40 protected:
39 TiledLayer(); 41 TiledLayer();
40 virtual ~TiledLayer(); 42 virtual ~TiledLayer();
41 43
42 void updateTileSizeAndTilingOption(); 44 void updateTileSizeAndTilingOption();
43 void updateBounds(); 45 void updateBounds();
44 46
45 // Exposed to subclasses for testing. 47 // Exposed to subclasses for testing.
46 void setTileSize(const gfx::Size&); 48 void setTileSize(const gfx::Size&);
47 void setTextureFormat(GLenum textureFormat) { m_textureFormat = textureForma t; } 49 void setTextureFormat(unsigned textureFormat) { m_textureFormat = textureFor mat; }
48 void setBorderTexelOption(LayerTilingData::BorderTexelOption); 50 void setBorderTexelOption(LayerTilingData::BorderTexelOption);
49 size_t numPaintedTiles() { return m_tiler->tiles().size(); } 51 size_t numPaintedTiles() { return m_tiler->tiles().size(); }
50 52
51 virtual LayerUpdater* updater() const = 0; 53 virtual LayerUpdater* updater() const = 0;
52 virtual void createUpdaterIfNeeded() = 0; 54 virtual void createUpdaterIfNeeded() = 0;
53 55
54 // Set invalidations to be potentially repainted during update(). 56 // Set invalidations to be potentially repainted during update().
55 void invalidateContentRect(const gfx::Rect& contentRect); 57 void invalidateContentRect(const gfx::Rect& contentRect);
56 58
57 // Reset state on tiles that will be used for updating the layer. 59 // Reset state on tiles that will be used for updating the layer.
(...skipping 25 matching lines...) Expand all
83 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);
84 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);
85 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& );
86 void updateScrollPrediction(); 88 void updateScrollPrediction();
87 89
88 UpdatableTile* tileAt(int, int) const; 90 UpdatableTile* tileAt(int, int) const;
89 UpdatableTile* createTile(int, int); 91 UpdatableTile* createTile(int, int);
90 92
91 bool isSmallAnimatedLayer() const; 93 bool isSmallAnimatedLayer() const;
92 94
93 GLenum m_textureFormat; 95 unsigned m_textureFormat;
94 bool m_skipsDraw; 96 bool m_skipsDraw;
95 bool m_failedUpdate; 97 bool m_failedUpdate;
96 98
97 // Used for predictive painting. 99 // Used for predictive painting.
98 gfx::Vector2d m_predictedScroll; 100 gfx::Vector2d m_predictedScroll;
99 gfx::Rect m_predictedVisibleRect; 101 gfx::Rect m_predictedVisibleRect;
100 gfx::Rect m_previousVisibleRect; 102 gfx::Rect m_previousVisibleRect;
101 gfx::Size m_previousContentBounds; 103 gfx::Size m_previousContentBounds;
102 104
103 TilingOption m_tilingOption; 105 TilingOption m_tilingOption;
104 scoped_ptr<LayerTilingData> m_tiler; 106 scoped_ptr<LayerTilingData> m_tiler;
105 }; 107 };
106 108
107 } 109 }
108 #endif // CC_TILED_LAYER_H_ 110 #endif // CC_TILED_LAYER_H_
OLDNEW
« no previous file with comments | « cc/thread_proxy.cc ('k') | cc/tiled_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698