Chromium Code Reviews| 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" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 RecreateFailedButTryAgain, | 132 RecreateFailedButTryAgain, |
| 133 RecreateFailedAndGaveUp, | 133 RecreateFailedAndGaveUp, |
| 134 }; | 134 }; |
| 135 RecreateResult recreateContext(); | 135 RecreateResult recreateContext(); |
| 136 void didCommitAndDrawFrame() { m_client->didCommitAndDrawFrame(); } | 136 void didCommitAndDrawFrame() { m_client->didCommitAndDrawFrame(); } |
| 137 void didCompleteSwapBuffers() { m_client->didCompleteSwapBuffers(); } | 137 void didCompleteSwapBuffers() { m_client->didCompleteSwapBuffers(); } |
| 138 void deleteContentsTexturesOnImplThread(CCResourceProvider*); | 138 void deleteContentsTexturesOnImplThread(CCResourceProvider*); |
| 139 virtual void acquireLayerTextures(); | 139 virtual void acquireLayerTextures(); |
| 140 // Returns false if we should abort this frame due to initialization failure . | 140 // Returns false if we should abort this frame due to initialization failure . |
| 141 bool initializeRendererIfNeeded(); | 141 bool initializeRendererIfNeeded(); |
| 142 void updateLayers(CCTextureUpdateQueue&, size_t contentsMemoryLimitBytes); | 142 void updateLayers(CCTextureUpdateQueue&, size_t contentsMemoryLimitBytes, si ze_t *maxTextureUpdates); |
| 143 | 143 |
| 144 CCLayerTreeHostClient* client() { return m_client; } | 144 CCLayerTreeHostClient* client() { return m_client; } |
| 145 | 145 |
| 146 // Only used when compositing on the main thread. | 146 // Only used when compositing on the main thread. |
| 147 void composite(); | 147 void composite(); |
| 148 void scheduleComposite(); | 148 void scheduleComposite(); |
| 149 | 149 |
| 150 // Composites and attempts to read back the result into the provided | 150 // Composites and attempts to read back the result into the provided |
| 151 // buffer. If it wasn't possible, e.g. due to context lost, will return | 151 // buffer. If it wasn't possible, e.g. due to context lost, will return |
| 152 // false. | 152 // false. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 private: | 225 private: |
| 226 typedef Vector<RefPtr<LayerChromium> > LayerList; | 226 typedef Vector<RefPtr<LayerChromium> > LayerList; |
| 227 typedef Vector<OwnPtr<CCPrioritizedTexture> > TextureList; | 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&, size_t *maxTextureU pdates); |
|
nduca
2012/09/13 20:23:04
wat?
| |
| 236 | 236 |
| 237 void prioritizeTextures(const LayerList&, CCOverdrawMetrics&); | 237 void prioritizeTextures(const LayerList&, CCOverdrawMetrics&); |
| 238 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes); | 238 void setPrioritiesForSurfaces(size_t surfaceMemoryBytes); |
| 239 void setPrioritiesForLayers(const LayerList&); | 239 void setPrioritiesForLayers(const LayerList&); |
| 240 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList); | 240 size_t calculateMemoryForRenderSurfaces(const LayerList& updateList); |
| 241 | 241 |
| 242 void animateLayers(double monotonicTime); | 242 void animateLayers(double monotonicTime); |
| 243 bool animateLayersRecursive(LayerChromium* current, double monotonicTime); | 243 bool animateLayersRecursive(LayerChromium* current, double monotonicTime); |
| 244 void setAnimationEventsRecursive(const CCAnimationEventsVector&, LayerChromi um*, double wallClockTime); | 244 void setAnimationEventsRecursive(const CCAnimationEventsVector&, LayerChromi um*, double wallClockTime); |
| 245 | 245 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 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 TextureList m_deleteTextureAfterCommitList; | 285 TextureList m_deleteTextureAfterCommitList; |
| 286 size_t m_maxPartialTextureUpdates; | |
| 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 |