| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 184     const IntSize& deviceViewportSize() const { return m_deviceViewportSize; } | 184     const IntSize& deviceViewportSize() const { return m_deviceViewportSize; } | 
| 185 | 185 | 
| 186     void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
     ctor, float maxPageScaleFactor); | 186     void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
     ctor, float maxPageScaleFactor); | 
| 187 | 187 | 
| 188     void setBackgroundColor(SkColor color) { m_backgroundColor = color; } | 188     void setBackgroundColor(SkColor color) { m_backgroundColor = color; } | 
| 189 | 189 | 
| 190     void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
     und = transparent; } | 190     void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
     und = transparent; } | 
| 191 | 191 | 
| 192     CCPrioritizedTextureManager* contentsTextureManager() const; | 192     CCPrioritizedTextureManager* contentsTextureManager() const; | 
| 193 | 193 | 
| 194     void unlinkAllContentTextures(); | 194     // Delete contents textures' backing resources until they use only bytesLimi
     t bytes. This may | 
| 195     void deleteUnlinkedTextures(); | 195     // be called on the impl thread while the main thread is running. | 
|  | 196     void reduceContentsTexturesMemoryOnImplThread(size_t bytesLimit, CCResourceP
     rovider*); | 
|  | 197     // Retrieve the list of all contents textures' backings that have been evict
     ed, to pass to the | 
|  | 198     // main thread to unlink them from their owning textures. | 
|  | 199     void getEvictedContentTexturesBackings(CCPrioritizedTextureManager::BackingV
     ector&); | 
|  | 200     // Unlink the list of contents textures' backings from their owning textures
      on the main thread | 
|  | 201     // before updating layers. | 
|  | 202     void unlinkEvictedContentTexturesBackings(const CCPrioritizedTextureManager:
     :BackingVector&); | 
|  | 203     // Deletes all evicted backings, unlinking them from their owning textures i
     f needed. | 
|  | 204     // Returns true if this function had to unlink any backings from their ownin
     g texture when | 
|  | 205     // destroying them. If this was the case, the impl layer tree may contain in
     valid resources. | 
|  | 206     bool deleteEvictedContentTexturesBackings(); | 
| 196 | 207 | 
| 197     bool visible() const { return m_visible; } | 208     bool visible() const { return m_visible; } | 
| 198     void setVisible(bool); | 209     void setVisible(bool); | 
| 199 | 210 | 
| 200     void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor, 
     float scale, double durationSec); | 211     void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor, 
     float scale, double durationSec); | 
| 201 | 212 | 
| 202     void applyScrollAndScale(const CCScrollAndScaleSet&); | 213     void applyScrollAndScale(const CCScrollAndScaleSet&); | 
| 203 | 214 | 
| 204     void startRateLimiter(WebKit::WebGraphicsContext3D*); | 215     void startRateLimiter(WebKit::WebGraphicsContext3D*); | 
| 205     void stopRateLimiter(WebKit::WebGraphicsContext3D*); | 216     void stopRateLimiter(WebKit::WebGraphicsContext3D*); | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 284 | 295 | 
| 285     TextureList m_deleteTextureAfterCommitList; | 296     TextureList m_deleteTextureAfterCommitList; | 
| 286     size_t m_partialTextureUpdateRequests; | 297     size_t m_partialTextureUpdateRequests; | 
| 287 | 298 | 
| 288     static bool s_needsFilterContext; | 299     static bool s_needsFilterContext; | 
| 289 }; | 300 }; | 
| 290 | 301 | 
| 291 } | 302 } | 
| 292 | 303 | 
| 293 #endif | 304 #endif | 
| OLD | NEW | 
|---|