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

Unified Diff: cc/raster/raster_buffer_provider.h

Issue 2560253003: Delay Activation/Draw in smoothness mode.
Patch Set: more unit tests 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/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 8c3b64473673c34ca7b73f0238cc8fd3462e58de..f11847281c15d6f1667a9afa2138d5a65803dabc 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(uint64_t)>& 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