Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: cc/resources/resource_provider.cc

Issue 197223003: Start of hardware overlay support in CC with Ubercompositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/texture_mailbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 1cb215bd20993c51ead0dc647575d86e6f535eb3..55dafbd47d20e36196a8924b800c97cbbc9191db 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),
+ allow_overlay(false),
shared_bitmap(NULL) {}
ResourceProvider::Resource::~Resource() {}
@@ -610,6 +611,11 @@ bool ResourceProvider::IsLost(ResourceId id) {
return resource->lost;
}
+bool ResourceProvider::AllowOverlay(ResourceId id) {
+ Resource* resource = GetResource(id);
+ return resource->allow_overlay;
+}
+
ResourceProvider::ResourceId ResourceProvider::CreateResource(
const gfx::Size& size,
GLint wrap_mode,
@@ -784,6 +790,7 @@ ResourceProvider::ResourceId ResourceProvider::CreateResourceFromTextureMailbox(
resource.release_callback =
base::Bind(&SingleReleaseCallback::Run,
base::Owned(release_callback.release()));
+ resource.allow_overlay = mailbox.allow_overlay();
return id;
}
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/texture_mailbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698