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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/own_ptr_vector.h" | 10 #include "cc/own_ptr_vector.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 const IntSize& deviceViewportSize() const { return m_deviceViewportSize; } | 162 const IntSize& deviceViewportSize() const { return m_deviceViewportSize; } |
163 | 163 |
164 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
ctor, float maxPageScaleFactor); | 164 void setPageScaleFactorAndLimits(float pageScaleFactor, float minPageScaleFa
ctor, float maxPageScaleFactor); |
165 | 165 |
166 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } | 166 void setBackgroundColor(SkColor color) { m_backgroundColor = color; } |
167 | 167 |
168 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
und = transparent; } | 168 void setHasTransparentBackground(bool transparent) { m_hasTransparentBackgro
und = transparent; } |
169 | 169 |
170 CCPrioritizedTextureManager* contentsTextureManager() const; | 170 CCPrioritizedTextureManager* contentsTextureManager() const; |
171 | 171 |
172 // Delete contents textures' backing resources until they use only bytesLimi
t bytes. This may | |
173 // be called on the impl thread while the main thread is running. | |
174 void reduceContentsTexturesMemoryOnImplThread(size_t bytesLimit, CCResourceP
rovider*); | |
175 // Returns true if there any evicted backing textures that have not been del
eted. | |
176 bool evictedContentsTexturesBackingsExist() const; | |
177 // Retrieve the list of all contents textures' backings that have been evict
ed, to pass to the | |
178 // main thread to unlink them from their owning textures. | |
179 void getEvictedContentTexturesBackings(CCPrioritizedTextureManager::BackingV
ector&); | |
180 // Unlink the list of contents textures' backings from their owning textures
on the main thread | |
181 // before updating layers. | |
182 void unlinkEvictedContentTexturesBackings(const CCPrioritizedTextureManager:
:BackingVector&); | |
183 // Deletes all evicted backings, unlinking them from their owning textures i
f needed. | |
184 // Returns true if this function had to unlink any backings from their ownin
g texture when | |
185 // destroying them. If this was the case, the impl layer tree may contain in
valid resources. | |
186 bool deleteEvictedContentTexturesBackings(); | |
187 | |
188 bool visible() const { return m_visible; } | 172 bool visible() const { return m_visible; } |
189 void setVisible(bool); | 173 void setVisible(bool); |
190 | 174 |
191 void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor,
float scale, double durationSec); | 175 void startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor,
float scale, double durationSec); |
192 | 176 |
193 void applyScrollAndScale(const CCScrollAndScaleSet&); | 177 void applyScrollAndScale(const CCScrollAndScaleSet&); |
194 void setImplTransform(const WebKit::WebTransformationMatrix&); | 178 void setImplTransform(const WebKit::WebTransformationMatrix&); |
195 | 179 |
196 void startRateLimiter(WebKit::WebGraphicsContext3D*); | 180 void startRateLimiter(WebKit::WebGraphicsContext3D*); |
197 void stopRateLimiter(WebKit::WebGraphicsContext3D*); | 181 void stopRateLimiter(WebKit::WebGraphicsContext3D*); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 size_t m_partialTextureUpdateRequests; | 263 size_t m_partialTextureUpdateRequests; |
280 | 264 |
281 static bool s_needsFilterContext; | 265 static bool s_needsFilterContext; |
282 | 266 |
283 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); | 267 DISALLOW_COPY_AND_ASSIGN(CCLayerTreeHost); |
284 }; | 268 }; |
285 | 269 |
286 } // namespace cc | 270 } // namespace cc |
287 | 271 |
288 #endif | 272 #endif |
OLD | NEW |