| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" | 
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" | 
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" | 
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 223     uint8_t* mapPixelBuffer(ResourceId id); | 223     uint8_t* mapPixelBuffer(ResourceId id); | 
| 224     void unmapPixelBuffer(ResourceId id); | 224     void unmapPixelBuffer(ResourceId id); | 
| 225 | 225 | 
| 226     // Update pixels from acquired pixel buffer. | 226     // Update pixels from acquired pixel buffer. | 
| 227     void setPixelsFromBuffer(ResourceId id); | 227     void setPixelsFromBuffer(ResourceId id); | 
| 228 | 228 | 
| 229     // Asynchronously update pixels from acquired pixel buffer. | 229     // Asynchronously update pixels from acquired pixel buffer. | 
| 230     void beginSetPixels(ResourceId id); | 230     void beginSetPixels(ResourceId id); | 
| 231     bool didSetPixelsComplete(ResourceId id); | 231     bool didSetPixelsComplete(ResourceId id); | 
| 232 | 232 | 
|  | 233     // Test hooks. | 
|  | 234     void loseOutputSurface(); | 
|  | 235 | 
| 233 private: | 236 private: | 
| 234     struct Resource { | 237     struct Resource { | 
| 235         Resource(); | 238         Resource(); | 
| 236         Resource(unsigned textureId, const gfx::Size& size, GLenum format, GLenu
     m filter); | 239         Resource(unsigned textureId, const gfx::Size& size, GLenum format, GLenu
     m filter); | 
| 237         Resource(uint8_t* pixels, const gfx::Size& size, GLenum format, GLenum f
     ilter); | 240         Resource(uint8_t* pixels, const gfx::Size& size, GLenum format, GLenum f
     ilter); | 
| 238 | 241 | 
| 239         unsigned glId; | 242         unsigned glId; | 
| 240         // Pixel buffer used for set pixels without unnecessary copying. | 243         // Pixel buffer used for set pixels without unnecessary copying. | 
| 241         unsigned glPixelBufferId; | 244         unsigned glPixelBufferId; | 
| 242         // Query used to determine when asynchronous set pixels complete. | 245         // Query used to determine when asynchronous set pixels complete. | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 294     GLenum m_bestTextureFormat; | 297     GLenum m_bestTextureFormat; | 
| 295 | 298 | 
| 296     base::ThreadChecker m_threadChecker; | 299     base::ThreadChecker m_threadChecker; | 
| 297 | 300 | 
| 298     DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 301     DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 
| 299 }; | 302 }; | 
| 300 | 303 | 
| 301 } | 304 } | 
| 302 | 305 | 
| 303 #endif  // CC_RESOURCE_PROVIDER_H_ | 306 #endif  // CC_RESOURCE_PROVIDER_H_ | 
| OLD | NEW | 
|---|