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

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: Construct the resource pool on demand. 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
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.h
diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h
index 30c227367f04c417ca458243429848b411ac9214..008161b952854c7bc70527bd9185b28c452b4a02 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,11 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
void ScheduleCALayers(DrawingFrame* frame);
void ScheduleOverlays(DrawingFrame* frame);
+ // Copies the contents of the render pass to an overlay resource, returned in
+ // |resource|. The resource is allocated from |overlay_resource_pool_|.
+ void CopyRenderPassToOverlayResource(const RenderPassId& render_pass_id,
+ Resource** resource);
+
using OverlayResourceLock =
std::unique_ptr<ResourceProvider::ScopedReadLockGL>;
using OverlayResourceLockList = std::vector<OverlayResourceLock>;
@@ -521,6 +527,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_;
+
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698