Index: cc/resources/resource_provider.cc |
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc |
index ed1d0da5f076d99adbcf21795db87a49477937ef..969d97d83cde9b97d78262aa624e5a4c9dd374ec 100644 |
--- a/cc/resources/resource_provider.cc |
+++ b/cc/resources/resource_provider.cc |
@@ -232,6 +232,7 @@ ResourceProvider::Resource::Resource() |
type(InvalidType), |
format(RGBA_8888), |
has_shared_bitmap_id(false), |
+ has_native_buffer_backing(false), |
shared_bitmap(NULL) {} |
ResourceProvider::Resource::~Resource() {} |
@@ -604,6 +605,11 @@ bool ResourceProvider::IsLost(ResourceId id) { |
return resource->lost; |
} |
+bool ResourceProvider::HasNativeBufferBacking(ResourceId id) { |
+ Resource* resource = GetResource(id); |
+ return resource->has_native_buffer_backing; |
+} |
+ |
ResourceProvider::ResourceId ResourceProvider::CreateResource( |
const gfx::Size& size, |
GLint wrap_mode, |
@@ -778,6 +784,7 @@ ResourceProvider::ResourceId ResourceProvider::CreateResourceFromTextureMailbox( |
resource.release_callback = |
base::Bind(&SingleReleaseCallback::Run, |
base::Owned(release_callback.release())); |
+ resource.has_native_buffer_backing = mailbox.hw_backed(); |
return id; |
} |