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 CCLayerTreeHost_h | 5 #ifndef CCLayerTreeHost_h |
6 #define CCLayerTreeHost_h | 6 #define CCLayerTreeHost_h |
7 | 7 |
8 #include "CCAnimationEvents.h" | 8 #include "CCAnimationEvents.h" |
9 #include "CCGraphicsContext.h" | 9 #include "CCGraphicsContext.h" |
10 #include "CCLayerTreeHostClient.h" | 10 #include "CCLayerTreeHostClient.h" |
11 #include "CCLayerTreeHostCommon.h" | 11 #include "CCLayerTreeHostCommon.h" |
12 #include "CCOcclusionTracker.h" | 12 #include "CCOcclusionTracker.h" |
13 #include "CCPrioritizedTextureManager.h" | 13 #include "CCPrioritizedTextureManager.h" |
14 #include "CCProxy.h" | 14 #include "CCProxy.h" |
15 #include "CCRenderingStats.h" | 15 #include "CCRenderingStats.h" |
16 #include "IntRect.h" | 16 #include "IntRect.h" |
17 #include "RateLimiter.h" | 17 #include "RateLimiter.h" |
18 #include "SkColor.h" | 18 #include "SkColor.h" |
| 19 #include "cc/own_ptr_vector.h" |
19 #include <limits> | 20 #include <limits> |
20 #include <wtf/HashMap.h> | 21 #include <wtf/HashMap.h> |
21 #include <wtf/OwnPtr.h> | 22 #include <wtf/OwnPtr.h> |
22 #include <wtf/PassOwnPtr.h> | 23 #include <wtf/PassOwnPtr.h> |
23 #include <wtf/PassRefPtr.h> | 24 #include <wtf/PassRefPtr.h> |
24 | 25 |
25 namespace cc { | 26 namespace cc { |
26 | 27 |
27 class CCFontAtlas; | 28 class CCFontAtlas; |
28 class CCLayerChromium; | 29 class CCLayerChromium; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 void setFontAtlas(PassOwnPtr<CCFontAtlas>); | 229 void setFontAtlas(PassOwnPtr<CCFontAtlas>); |
229 | 230 |
230 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } | 231 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } |
231 | 232 |
232 protected: | 233 protected: |
233 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); | 234 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); |
234 bool initialize(); | 235 bool initialize(); |
235 | 236 |
236 private: | 237 private: |
237 typedef Vector<RefPtr<LayerChromium> > LayerList; | 238 typedef Vector<RefPtr<LayerChromium> > LayerList; |
238 typedef Vector<OwnPtr<CCPrioritizedTexture> > TextureList; | |
239 | 239 |
240 void initializeRenderer(); | 240 void initializeRenderer(); |
241 | 241 |
242 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker*
); | 242 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker*
); |
243 bool paintLayerContents(const LayerList&, CCTextureUpdateQueue&); | 243 bool paintLayerContents(const LayerList&, CCTextureUpdateQueue&); |
244 bool paintMasksForRenderSurface(LayerChromium*, CCTextureUpdateQueue&); | 244 bool paintMasksForRenderSurface(LayerChromium*, CCTextureUpdateQueue&); |
245 | 245 |
246 void updateLayers(LayerChromium*, CCTextureUpdateQueue&); | 246 void updateLayers(LayerChromium*, CCTextureUpdateQueue&); |
247 | 247 |
248 void prioritizeTextures(const LayerList&, CCOverdrawMetrics&); | 248 void prioritizeTextures(const LayerList&, CCOverdrawMetrics&); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 typedef HashMap<WebKit::WebGraphicsContext3D*, RefPtr<RateLimiter> > RateLim
iterMap; | 286 typedef HashMap<WebKit::WebGraphicsContext3D*, RefPtr<RateLimiter> > RateLim
iterMap; |
287 RateLimiterMap m_rateLimiters; | 287 RateLimiterMap m_rateLimiters; |
288 | 288 |
289 float m_pageScaleFactor; | 289 float m_pageScaleFactor; |
290 float m_minPageScaleFactor, m_maxPageScaleFactor; | 290 float m_minPageScaleFactor, m_maxPageScaleFactor; |
291 bool m_triggerIdleUpdates; | 291 bool m_triggerIdleUpdates; |
292 | 292 |
293 SkColor m_backgroundColor; | 293 SkColor m_backgroundColor; |
294 bool m_hasTransparentBackground; | 294 bool m_hasTransparentBackground; |
295 | 295 |
| 296 typedef OwnPtrVector<CCPrioritizedTexture> TextureList; |
296 TextureList m_deleteTextureAfterCommitList; | 297 TextureList m_deleteTextureAfterCommitList; |
297 size_t m_partialTextureUpdateRequests; | 298 size_t m_partialTextureUpdateRequests; |
298 | 299 |
299 static bool s_needsFilterContext; | 300 static bool s_needsFilterContext; |
300 }; | 301 }; |
301 | 302 |
302 } | 303 } |
303 | 304 |
304 #endif | 305 #endif |
OLD | NEW |