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

Unified Diff: cc/raster/raster_buffer_provider.h

Issue 2555743004: Delay activation/draw on GPU tile work completion (Closed)
Patch Set: rebase compile fix Created 3 years, 11 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/raster/one_copy_raster_buffer_provider.cc ('k') | cc/raster/raster_buffer_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/raster_buffer_provider.h
diff --git a/cc/raster/raster_buffer_provider.h b/cc/raster/raster_buffer_provider.h
index 30dcc2959ad172b554eae3f38a37826274559877..48045842c67901217ab11fc0dc5cabc1184e27c4 100644
--- a/cc/raster/raster_buffer_provider.h
+++ b/cc/raster/raster_buffer_provider.h
@@ -12,6 +12,7 @@
#include "cc/raster/task_graph_runner.h"
#include "cc/raster/tile_task.h"
#include "cc/resources/resource_format.h"
+#include "cc/resources/resource_provider.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -63,6 +64,20 @@ class CC_EXPORT RasterBufferProvider {
// the Resource provided in AcquireBufferForRaster.
virtual bool CanPartialRasterIntoProvidedResource() const = 0;
+ // Returns true if the indicated resource is ready to draw.
+ virtual bool IsResourceReadyToDraw(ResourceId id) const = 0;
+
+ // Calls the provided |callback| when the provided |resources| are ready to
+ // draw. Returns a callback ID which can be used to track this callback.
+ // Will return 0 if no callback is needed (resources are already ready to
+ // draw). The caller may optionally pass the ID of a pending callback to
+ // avoid creating a new callback unnecessarily. If the caller does not
+ // have a pending callback, 0 should be passed for |pending_callback_id|.
+ virtual uint64_t SetReadyToDrawCallback(
+ const ResourceProvider::ResourceIdArray& resource_ids,
+ const base::Callback<void()>& callback,
+ uint64_t pending_callback_id) const = 0;
+
// Shutdown for doing cleanup.
virtual void Shutdown() = 0;
« no previous file with comments | « cc/raster/one_copy_raster_buffer_provider.cc ('k') | cc/raster/raster_buffer_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698