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

Unified Diff: cc/raster/raster_buffer_provider.h

Issue 2555743004: Delay activation/draw on GPU tile work completion (Closed)
Patch Set: Fix tile release logic. 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
Index: cc/raster/raster_buffer_provider.h
diff --git a/cc/raster/raster_buffer_provider.h b/cc/raster/raster_buffer_provider.h
index 8c3b64473673c34ca7b73f0238cc8fd3462e58de..701fec97f72063c1a458c341da75a0e81e9991d5 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,19 @@ 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.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698