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_RESOURCES_RESOURCE_PROVIDER_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_ |
6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ | 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 void EnableReadLockFences(ResourceProvider::ResourceId id, bool enable); | 367 void EnableReadLockFences(ResourceProvider::ResourceId id, bool enable); |
368 | 368 |
369 // Indicates if we can currently lock this resource for write. | 369 // Indicates if we can currently lock this resource for write. |
370 bool CanLockForWrite(ResourceId id); | 370 bool CanLockForWrite(ResourceId id); |
371 | 371 |
372 // Copy pixels from source to destination. | 372 // Copy pixels from source to destination. |
373 void CopyResource(ResourceId source_id, ResourceId dest_id); | 373 void CopyResource(ResourceId source_id, ResourceId dest_id); |
374 | 374 |
375 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); | 375 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); |
376 | 376 |
377 // Hide Gpu Raster implementation details. | |
reveman
2014/07/01 14:49:23
Please explain what these functions are used for i
sohanjg
2014/07/01 16:25:59
Done.
| |
378 void PushGroupMarker(const char* name); | |
379 void PopGroupMarker(); | |
380 | |
381 void ResetGpuContext(); | |
382 void FlushGpuContext(); | |
reveman
2014/07/01 14:49:23
I think we can come up with a better API than this
sohanjg
2014/07/01 16:25:59
Done.
| |
383 | |
377 private: | 384 private: |
378 class GpuRasterBuffer; | 385 class GpuRasterBuffer; |
379 class ImageRasterBuffer; | 386 class ImageRasterBuffer; |
380 class PixelRasterBuffer; | 387 class PixelRasterBuffer; |
381 | 388 |
382 struct Resource { | 389 struct Resource { |
383 enum Origin { Internal, External, Delegated }; | 390 enum Origin { Internal, External, Delegated }; |
384 | 391 |
385 Resource(); | 392 Resource(); |
386 ~Resource(); | 393 ~Resource(); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
702 return format_gl_data_format[format]; | 709 return format_gl_data_format[format]; |
703 } | 710 } |
704 | 711 |
705 inline GLenum GLInternalFormat(ResourceFormat format) { | 712 inline GLenum GLInternalFormat(ResourceFormat format) { |
706 return GLDataFormat(format); | 713 return GLDataFormat(format); |
707 } | 714 } |
708 | 715 |
709 } // namespace cc | 716 } // namespace cc |
710 | 717 |
711 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 718 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
OLD | NEW |