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

Unified Diff: cc/output/gl_renderer.h

Issue 2162193002: Add logic to GLRenderer to support RenderPassDrawQuad copying. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 5 months 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/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);
};
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698