| 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;
|
|
|
|
|