| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 const IntSize& deviceViewportSize() const { return m_deviceViewportSize; } | 171 const IntSize& deviceViewportSize() const { return m_deviceViewportSize; } |
| 172 | 172 |
| 173 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
ctor, float maxPageScaleFactor); | 173 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
ctor, float maxPageScaleFactor); |
| 174 | 174 |
| 175 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } | 175 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } |
| 176 | 176 |
| 177 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
und = transparent; } | 177 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
und = transparent; } |
| 178 | 178 |
| 179 CCPrioritizedTextureManager* contentsTextureManager() const; | 179 CCPrioritizedTextureManager* contentsTextureManager() const; |
| 180 | 180 |
| 181 // Delete contents textures' backing resources until they use only bytesLimi
t bytes. This may | |
| 182 // be called on the impl thread while the main thread is running. | |
| 183 void reduceContentsTexturesMemoryOnImplThread(size_t bytesLimit, CCResourceP
rovider*); | |
| 184 // Returns true if there any evicted backing textures that have not been del
eted. | |
| 185 bool evictedContentsTexturesBackingsExist() const; | |
| 186 // Retrieve the list of all contents textures' backings that have been evict
ed, to pass to the | |
| 187 // main thread to unlink them from their owning textures. | |
| 188 void getEvictedContentTexturesBackings(CCPrioritizedTextureManager::BackingV
ector&); | |
| 189 // Unlink the list of contents textures' backings from their owning textures
on the main thread | |
| 190 // before updating layers. | |
| 191 void unlinkEvictedContentTexturesBackings(const CCPrioritizedTextureManager:
:BackingVector&); | |
| 192 // Deletes all evicted backings, unlinking them from their owning textures i
f needed. | |
| 193 // Returns true if this function had to unlink any backings from their ownin
g texture when | |
| 194 // destroying them. If this was the case, the impl layer tree may contain in
valid resources. | |
| 195 bool deleteEvictedContentTexturesBackings(); | |
| 196 | |
| 197 bool visible() const { return m_visible; } | 181 bool visible() const { return m_visible; } |
| 198 void setVisible(bool); | 182 void setVisible(bool); |
| 199 | 183 |
| 200 void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor,
float scale, double durationSec); | 184 void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor,
float scale, double durationSec); |
| 201 | 185 |
| 202 void applyScrollAndScale(const CCScrollAndScaleSet&); | 186 void applyScrollAndScale(const CCScrollAndScaleSet&); |
| 203 void setImplTransform(const WebKit::WebTransformationMatrix&); | 187 void setImplTransform(const WebKit::WebTransformationMatrix&); |
| 204 | 188 |
| 205 void startRateLimiter(WebKit::WebGraphicsContext3D*); | 189 void startRateLimiter(WebKit::WebGraphicsContext3D*); |
| 206 void stopRateLimiter(WebKit::WebGraphicsContext3D*); | 190 void stopRateLimiter(WebKit::WebGraphicsContext3D*); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 size_t m_partialTextureUpdateRequests; | 272 size_t m_partialTextureUpdateRequests; |
| 289 | 273 |
| 290 static bool s_needsFilterContext; | 274 static bool s_needsFilterContext; |
| 291 | 275 |
| 292 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); | 276 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); |
| 293 }; | 277 }; |
| 294 | 278 |
| 295 } // namespace cc | 279 } // namespace cc |
| 296 | 280 |
| 297 #endif | 281 #endif |
| OLD | NEW |