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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 void setFontAtlas(PassOwnPtr<CCFontAtlas>); | 218 void setFontAtlas(PassOwnPtr<CCFontAtlas>); |
218 | 219 |
219 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } | 220 HeadsUpDisplayLayerChromium* hudLayer() const { return m_hudLayer.get(); } |
220 | 221 |
221 protected: | 222 protected: |
222 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); | 223 CCLayerTreeHost(CCLayerTreeHostClient*, const CCLayerTreeSettings&); |
223 bool initialize(); | 224 bool initialize(); |
224 | 225 |
225 private: | 226 private: |
226 typedef Vector<RefPtr<LayerChromium> > LayerList; | 227 typedef Vector<RefPtr<LayerChromium> > LayerList; |
227 typedef Vector<OwnPtr<CCPrioritizedTexture> > TextureList; | |
228 | 228 |
229 void initializeRenderer(); | 229 void initializeRenderer(); |
230 | 230 |
231 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker*
); | 231 void update(LayerChromium*, CCTextureUpdateQueue&, const CCOcclusionTracker*
); |
232 bool paintLayerContents(const LayerList&, CCTextureUpdateQueue&); | 232 bool paintLayerContents(const LayerList&, CCTextureUpdateQueue&); |
233 bool paintMasksForRenderSurface(LayerChromium*, CCTextureUpdateQueue&); | 233 bool paintMasksForRenderSurface(LayerChromium*, CCTextureUpdateQueue&); |
234 | 234 |
235 void updateLayers(LayerChromium*, CCTextureUpdateQueue&); | 235 void updateLayers(LayerChromium*, CCTextureUpdateQueue&); |
236 | 236 |
237 void prioritizeTextures(const LayerList&, CCOverdrawMetrics&); | 237 void prioritizeTextures(const LayerList&, CCOverdrawMetrics&); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 typedef HashMap<WebKit::WebGraphicsContext3D*, RefPtr<RateLimiter> > RateLim
iterMap; | 275 typedef HashMap<WebKit::WebGraphicsContext3D*, RefPtr<RateLimiter> > RateLim
iterMap; |
276 RateLimiterMap m_rateLimiters; | 276 RateLimiterMap m_rateLimiters; |
277 | 277 |
278 float m_pageScaleFactor; | 278 float m_pageScaleFactor; |
279 float m_minPageScaleFactor, m_maxPageScaleFactor; | 279 float m_minPageScaleFactor, m_maxPageScaleFactor; |
280 bool m_triggerIdleUpdates; | 280 bool m_triggerIdleUpdates; |
281 | 281 |
282 SkColor m_backgroundColor; | 282 SkColor m_backgroundColor; |
283 bool m_hasTransparentBackground; | 283 bool m_hasTransparentBackground; |
284 | 284 |
| 285 typedef OwnPtrVector<CCPrioritizedTexture> TextureList; |
285 TextureList m_deleteTextureAfterCommitList; | 286 TextureList m_deleteTextureAfterCommitList; |
286 size_t m_partialTextureUpdateRequests; | 287 size_t m_partialTextureUpdateRequests; |
287 | 288 |
288 static bool s_needsFilterContext; | 289 static bool s_needsFilterContext; |
289 }; | 290 }; |
290 | 291 |
291 } | 292 } |
292 | 293 |
293 #endif | 294 #endif |
OLD | NEW |