Chromium Code Reviews| 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. |
|
vmpstr
2017/01/05 22:00:46
Can you specify to pass 0 if no pending callback e
ericrk
2017/01/09 23:05:21
The RasterBufferProvider knows the last callback i
|
| + 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; |