Chromium Code Reviews| Index: cc/output/gl_renderer.h |
| diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h |
| index 30c227367f04c417ca458243429848b411ac9214..51b4c907c33a752bc94c6124e390ab0f0ec68b90 100644 |
| --- a/cc/output/gl_renderer.h |
| +++ b/cc/output/gl_renderer.h |
| @@ -35,6 +35,7 @@ namespace cc { |
| class GLRendererShaderTest; |
| class OutputSurface; |
| class PictureDrawQuad; |
| +class ResourcePool; |
| class ScopedResource; |
| class StreamVideoDrawQuad; |
| class TextureDrawQuad; |
| @@ -263,6 +264,16 @@ class CC_EXPORT GLRenderer : public DirectRenderer { |
| void ScheduleCALayers(DrawingFrame* frame); |
| void ScheduleOverlays(DrawingFrame* frame); |
| + // Indicates that an overlay resource with the given |texture| id is no longer |
| + // in use. |
| + void OverlayResourceNoLongerInUse(GLuint texture); |
| + |
| + // Copies the contents of the render pass to an overlay resource, returned in |
| + // |resource_id|. The resource is allocated from |overlay_resource_pool_|, and |
| + // stays allocated until OverlayResourceNoLongerInUse() is called. |
| + void CopyRenderPassToOverlayResource(const RenderPassId& render_pass_id, |
| + ResourceId* resource_id); |
| + |
| using OverlayResourceLock = |
| std::unique_ptr<ResourceProvider::ScopedReadLockGL>; |
| using OverlayResourceLockList = std::vector<OverlayResourceLock>; |
| @@ -521,6 +532,10 @@ class CC_EXPORT GLRenderer : public DirectRenderer { |
| bool use_blend_equation_advanced_; |
| bool use_blend_equation_advanced_coherent_; |
| + // Some overlays require that content is copied from a render pass into an |
| + // overlay resource. This means the GLRenderer needs its own ResourcePool. |
| + std::unique_ptr<ResourcePool> overlay_resource_pool_; |
|
ccameron
2016/07/20 22:13:53
I'd add a
std::map<ResourceId, Resource*> overla
|
| + |
| BoundGeometry bound_geometry_; |
| DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| }; |