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

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: 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 unified diff | Download patch
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Copies the contents of the render pass to an overlay resource, returned in
268 // |resource|. The resource is allocated from |overlay_resource_pool_|.
269 void CopyRenderPassToOverlayResource(const RenderPassId& render_pass_id,
270 Resource** resource);
271
266 using OverlayResourceLock = 272 using OverlayResourceLock =
267 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; 273 std::unique_ptr<ResourceProvider::ScopedReadLockGL>;
268 using OverlayResourceLockList = std::vector<OverlayResourceLock>; 274 using OverlayResourceLockList = std::vector<OverlayResourceLock>;
269 275
270 // Resources that have been sent to the GPU process, but not yet swapped. 276 // Resources that have been sent to the GPU process, but not yet swapped.
271 OverlayResourceLockList pending_overlay_resources_; 277 OverlayResourceLockList pending_overlay_resources_;
272 278
273 // Resources that should be shortly swapped by the GPU process. 279 // Resources that should be shortly swapped by the GPU process.
274 std::deque<OverlayResourceLockList> swapping_overlay_resources_; 280 std::deque<OverlayResourceLockList> swapping_overlay_resources_;
275 281
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 ResourceFormat current_framebuffer_format_; 520 ResourceFormat current_framebuffer_format_;
515 521
516 class SyncQuery; 522 class SyncQuery;
517 std::deque<std::unique_ptr<SyncQuery>> pending_sync_queries_; 523 std::deque<std::unique_ptr<SyncQuery>> pending_sync_queries_;
518 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_; 524 std::deque<std::unique_ptr<SyncQuery>> available_sync_queries_;
519 std::unique_ptr<SyncQuery> current_sync_query_; 525 std::unique_ptr<SyncQuery> current_sync_query_;
520 bool use_sync_query_; 526 bool use_sync_query_;
521 bool use_blend_equation_advanced_; 527 bool use_blend_equation_advanced_;
522 bool use_blend_equation_advanced_coherent_; 528 bool use_blend_equation_advanced_coherent_;
523 529
530 // Some overlays require that content is copied from a render pass into an
531 // overlay resource. This means the GLRenderer needs its own ResourcePool.
532 std::unique_ptr<ResourcePool> overlay_resource_pool_;
533
524 BoundGeometry bound_geometry_; 534 BoundGeometry bound_geometry_;
525 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 535 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
526 }; 536 };
527 537
528 } // namespace cc 538 } // namespace cc
529 539
530 #endif // CC_OUTPUT_GL_RENDERER_H_ 540 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« 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