| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CC_RESOURCE_PROVIDER_H_ | 5 #ifndef CC_RESOURCE_PROVIDER_H_ |
| 6 #define CC_RESOURCE_PROVIDER_H_ | 6 #define CC_RESOURCE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void deleteResource(ResourceId); | 92 void deleteResource(ResourceId); |
| 93 | 93 |
| 94 // Update pixels from image, copying sourceRect (in image) into destRect (in
the resource). | 94 // Update pixels from image, copying sourceRect (in image) into destRect (in
the resource). |
| 95 void setPixels(ResourceId, const uint8_t* image, const gfx::Rect& imageRect,
const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset); | 95 void setPixels(ResourceId, const uint8_t* image, const gfx::Rect& imageRect,
const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset); |
| 96 | 96 |
| 97 // Check upload status. | 97 // Check upload status. |
| 98 size_t numBlockingUploads(); | 98 size_t numBlockingUploads(); |
| 99 void markPendingUploadsAsNonBlocking(); | 99 void markPendingUploadsAsNonBlocking(); |
| 100 double estimatedUploadsPerSecond(); | 100 double estimatedUploadsPerSecond(); |
| 101 void flushUploads(); | 101 void flushUploads(); |
| 102 void releaseCachedData(); |
| 102 | 103 |
| 103 // Flush all context operations, kicking uploads and ensuring ordering with | 104 // Flush all context operations, kicking uploads and ensuring ordering with |
| 104 // respect to other contexts. | 105 // respect to other contexts. |
| 105 void flush(); | 106 void flush(); |
| 106 | 107 |
| 107 // Only flush the command buffer if supported. | 108 // Only flush the command buffer if supported. |
| 108 // Returns true if the shallow flush occurred, false otherwise. | 109 // Returns true if the shallow flush occurred, false otherwise. |
| 109 bool shallowFlushIfSupported(); | 110 bool shallowFlushIfSupported(); |
| 110 | 111 |
| 111 // Creates accounting for a child. Returns a child ID. | 112 // Creates accounting for a child. Returns a child ID. |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 base::ThreadChecker m_threadChecker; | 337 base::ThreadChecker m_threadChecker; |
| 337 | 338 |
| 338 scoped_refptr<Fence> m_currentReadLockFence; | 339 scoped_refptr<Fence> m_currentReadLockFence; |
| 339 | 340 |
| 340 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 341 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 341 }; | 342 }; |
| 342 | 343 |
| 343 } | 344 } |
| 344 | 345 |
| 345 #endif // CC_RESOURCE_PROVIDER_H_ | 346 #endif // CC_RESOURCE_PROVIDER_H_ |
| OLD | NEW |