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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_OUTPUT_GL_RENDERER_H_ 5 #ifndef CC_OUTPUT_GL_RENDERER_H_
6 #define CC_OUTPUT_GL_RENDERER_H_ 6 #define CC_OUTPUT_GL_RENDERER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 namespace gles2 { 28 namespace gles2 {
29 class GLES2Interface; 29 class GLES2Interface;
30 } 30 }
31 } 31 }
32 32
33 namespace cc { 33 namespace cc {
34 34
35 class GLRendererShaderTest; 35 class GLRendererShaderTest;
36 class OutputSurface; 36 class OutputSurface;
37 class PictureDrawQuad; 37 class PictureDrawQuad;
38 class ResourcePool;
38 class ScopedResource; 39 class ScopedResource;
39 class StreamVideoDrawQuad; 40 class StreamVideoDrawQuad;
40 class TextureDrawQuad; 41 class TextureDrawQuad;
41 class TextureMailboxDeleter; 42 class TextureMailboxDeleter;
42 class StaticGeometryBinding; 43 class StaticGeometryBinding;
43 class DynamicGeometryBinding; 44 class DynamicGeometryBinding;
44 class ScopedEnsureFramebufferAllocation; 45 class ScopedEnsureFramebufferAllocation;
45 46
46 // Class that handles drawing of composited render layers using GL. 47 // Class that handles drawing of composited render layers using GL.
47 class CC_EXPORT GLRenderer : public DirectRenderer { 48 class CC_EXPORT GLRenderer : public DirectRenderer {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void RestoreGLState(); 257 void RestoreGLState();
257 void RestoreFramebuffer(DrawingFrame* frame); 258 void RestoreFramebuffer(DrawingFrame* frame);
258 259
259 void DiscardBackbuffer() override; 260 void DiscardBackbuffer() override;
260 void EnsureBackbuffer() override; 261 void EnsureBackbuffer() override;
261 void EnforceMemoryPolicy(); 262 void EnforceMemoryPolicy();
262 263
263 void ScheduleCALayers(DrawingFrame* frame); 264 void ScheduleCALayers(DrawingFrame* frame);
264 void ScheduleOverlays(DrawingFrame* frame); 265 void ScheduleOverlays(DrawingFrame* frame);
265 266
267 // Indicates that an overlay resource with the given |texture| id is no longer
268 // in use.
269 void OverlayResourceNoLongerInUse(GLuint texture);
270
271 // Copies the contents of the render pass to an overlay resource, returned in
272 // |resource_id|. The resource is allocated from |overlay_resource_pool_|, and
273 // stays allocated until OverlayResourceNoLongerInUse() is called.
274 void CopyRenderPassToOverlayResource(const RenderPassId& render_pass_id,
275 ResourceId* resource_id);
276
266 using OverlayResourceLock = 277 using OverlayResourceLock =
267 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; 278 std::unique_ptr<ResourceProvider::ScopedReadLockGL>;
268 using OverlayResourceLockList = std::vector<OverlayResourceLock>; 279 using OverlayResourceLockList = std::vector<OverlayResourceLock>;
269 280
270 // Resources that have been sent to the GPU process, but not yet swapped. 281 // Resources that have been sent to the GPU process, but not yet swapped.
271 OverlayResourceLockList pending_overlay_resources_; 282 OverlayResourceLockList pending_overlay_resources_;
272 283
273 // Resources that should be shortly swapped by the GPU process. 284 // Resources that should be shortly swapped by the GPU process.
274 std::deque<OverlayResourceLockList> swapping_overlay_resources_; 285 std::deque<OverlayResourceLockList> swapping_overlay_resources_;
275 286
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 ResourceFormat current_framebuffer_format_; 525 ResourceFormat current_framebuffer_format_;
515 526
516 class SyncQuery; 527 class SyncQuery;
517 std::deque<std::unique_ptr<SyncQuery>> pending_sync_queries_; 528 std::deque<std::unique_ptr<SyncQuery>> pending_sync_queries_;
518 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_; 529 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_;
519 std::unique_ptr<SyncQuery> current_sync_query_; 530 std::unique_ptr<SyncQuery> current_sync_query_;
520 bool use_sync_query_; 531 bool use_sync_query_;
521 bool use_blend_equation_advanced_; 532 bool use_blend_equation_advanced_;
522 bool use_blend_equation_advanced_coherent_; 533 bool use_blend_equation_advanced_coherent_;
523 534
535 // Some overlays require that content is copied from a render pass into an
536 // overlay resource. This means the GLRenderer needs its own ResourcePool.
537 std::unique_ptr<ResourcePool> overlay_resource_pool_;
ccameron 2016/07/20 22:13:53 I'd add a std::map<ResourceId, Resource*> overla
538
524 BoundGeometry bound_geometry_; 539 BoundGeometry bound_geometry_;
525 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 540 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
526 }; 541 };
527 542
528 } // namespace cc 543 } // namespace cc
529 544
530 #endif // CC_OUTPUT_GL_RENDERER_H_ 545 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« 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