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

Unified Diff: cc/resources/resource_provider.h

Issue 2440093003: WIP GPU scheduler + delayed activation / tile draw
Patch Set: SignalSyncToken -> IsFenceSyncReleased Created 4 years 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/raster/zero_copy_raster_buffer_provider.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 38d086ded899777379b128abdf11d89ead00f17a..131d58886f4e58fbe74d6cc2002bd8245421b06d 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -18,6 +18,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/cancelable_callback.h"
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/threading/thread_checker.h"
@@ -162,6 +163,9 @@ class CC_EXPORT ResourceProvider
void GenerateSyncTokenForResource(ResourceId resource_id);
void GenerateSyncTokenForResources(const ResourceIdArray& resource_ids);
+ gpu::SyncToken GetSyncTokenForResource(ResourceId resource_id);
+ gpu::SyncToken GetSyncTokenForResources(const ResourceIdArray& resource_ids);
+
// Creates accounting for a child. Returns a child ID.
int CreateChild(const ReturnCallback& return_callback);
@@ -192,7 +196,8 @@ class CC_EXPORT ResourceProvider
// NOTE: if the sync_token is set on any TransferableResource, this will
// wait on it.
void ReceiveFromChild(
- int child, const TransferableResourceArray& transferable_resources);
+ int child,
+ const TransferableResourceArray& transferable_resources);
// Once a set of resources have been received, they may or may not be used.
// This declares what set of resources are currently in use from the child,
@@ -273,6 +278,8 @@ class CC_EXPORT ResourceProvider
const TextureMailbox& mailbox() const { return mailbox_; }
+ const gpu::SyncToken& sync_token() const { return sync_token_; }
+
void set_sync_token(const gpu::SyncToken& sync_token) {
sync_token_ = sync_token;
has_sync_token_ = true;
@@ -712,6 +719,8 @@ class CC_EXPORT ResourceProvider
// resource providers.
int tracing_id_;
+ base::WeakPtrFactory<ResourceProvider> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
};
« no previous file with comments | « cc/raster/zero_copy_raster_buffer_provider.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698