Index: cc/resources/resource_provider.h |
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h |
index e964437757ba5ed4e6f7c8356bb083cc00c78e67..98c05cca193a651ec5233187abf842be604dc46b 100644 |
--- a/cc/resources/resource_provider.h |
+++ b/cc/resources/resource_provider.h |
@@ -314,11 +314,15 @@ class CC_EXPORT ResourceProvider { |
offscreen_context_provider_ = offscreen_context_provider; |
} |
+ // Sets if zero-copy GPU memory buffers should be used. |
+ void SetUseGpuMemoryBuffers(bool use_gpu_memory_buffers); |
+ |
private: |
struct Resource { |
Resource(); |
~Resource(); |
- Resource(unsigned texture_id, gfx::Size size, GLenum format, GLenum filter); |
+ Resource(unsigned texture_id, gfx::Size size, GLenum format, GLenum filter, |
+ bool use_gpu_memory_buffer); |
Resource(uint8_t* pixels, gfx::Size size, GLenum format, GLenum filter); |
unsigned gl_id; |
@@ -344,6 +348,7 @@ class CC_EXPORT ResourceProvider { |
// TODO(skyostil): Use a separate sampler object for filter state. |
GLenum filter; |
ResourceType type; |
+ bool use_gpu_memory_buffer; |
}; |
typedef base::hash_map<ResourceId, Resource> ResourceMap; |
struct Child { |
@@ -379,6 +384,7 @@ class CC_EXPORT ResourceProvider { |
}; |
void DeleteResourceInternal(ResourceMap::iterator it, DeleteStyle style); |
void LazyAllocate(Resource* resource); |
+ GLenum GetTargetGivenResource(Resource* resource); |
OutputSurface* output_surface_; |
bool lost_output_surface_; |
@@ -402,6 +408,8 @@ class CC_EXPORT ResourceProvider { |
scoped_refptr<Fence> current_read_lock_fence_; |
+ bool use_gpu_memory_buffers_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
}; |