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

Side by Side Diff: cc/output/gl_renderer.h

Issue 2205133003: Implement new RPDQ copy logic for CALayer promotion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp60_more_refactor
Patch Set: Fix cc_unittests. Created 4 years, 4 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 void ReinitializeGLState(); 263 void ReinitializeGLState();
264 void RestoreGLState(); 264 void RestoreGLState();
265 265
266 void DiscardBackbuffer() override; 266 void DiscardBackbuffer() override;
267 void EnsureBackbuffer() override; 267 void EnsureBackbuffer() override;
268 void EnforceMemoryPolicy(); 268 void EnforceMemoryPolicy();
269 269
270 void ScheduleCALayers(DrawingFrame* frame); 270 void ScheduleCALayers(DrawingFrame* frame);
271 void ScheduleOverlays(DrawingFrame* frame); 271 void ScheduleOverlays(DrawingFrame* frame);
272 272
273 // Copies the contents of the render pass draw quad, including filter effects,
274 // to an overlay resource, returned in |resource|. The resource is allocated
275 // from |overlay_resource_pool_|.
276 // The resulting Resource may be larger than the original quad. The new size
277 // and position is placed in |new_bounds|.
278 void CopyRenderPassDrawQuadToOverlayResource(
279 const CALayerOverlay* ca_layer_overlay,
280 Resource** resource,
281 DrawingFrame* frame,
282 gfx::RectF* new_bounds);
283
284 // Schedules the |ca_layer_overlay|, which is guaranteed to have a non-null
285 // |rpdq| parameter.
286 void ScheduleRenderPassDrawQuad(const CALayerOverlay* ca_layer_overlay,
287 DrawingFrame* external_frame);
288
273 using OverlayResourceLock = 289 using OverlayResourceLock =
274 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; 290 std::unique_ptr<ResourceProvider::ScopedReadLockGL>;
275 using OverlayResourceLockList = std::vector<OverlayResourceLock>; 291 using OverlayResourceLockList = std::vector<OverlayResourceLock>;
276 292
277 // Resources that have been sent to the GPU process, but not yet swapped. 293 // Resources that have been sent to the GPU process, but not yet swapped.
278 OverlayResourceLockList pending_overlay_resources_; 294 OverlayResourceLockList pending_overlay_resources_;
279 295
280 // Resources that should be shortly swapped by the GPU process. 296 // Resources that should be shortly swapped by the GPU process.
281 std::deque<OverlayResourceLockList> swapping_overlay_resources_; 297 std::deque<OverlayResourceLockList> swapping_overlay_resources_;
282 298
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 bool use_sync_query_; 543 bool use_sync_query_;
528 bool use_blend_equation_advanced_; 544 bool use_blend_equation_advanced_;
529 bool use_blend_equation_advanced_coherent_; 545 bool use_blend_equation_advanced_coherent_;
530 546
531 // Some overlays require that content is copied from a render pass into an 547 // Some overlays require that content is copied from a render pass into an
532 // overlay resource. This means the GLRenderer needs its own ResourcePool. 548 // overlay resource. This means the GLRenderer needs its own ResourcePool.
533 std::unique_ptr<ResourcePool> overlay_resource_pool_; 549 std::unique_ptr<ResourcePool> overlay_resource_pool_;
534 550
535 // If true, draw a green border after compositing a texture quad using GL. 551 // If true, draw a green border after compositing a texture quad using GL.
536 bool gl_composited_texture_quad_border_; 552 bool gl_composited_texture_quad_border_;
553
554 // The method FlippedFramebuffer determines whether the framebuffer associated
555 // with a DrawingFrame is flipped. It makes the assumption that the
556 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is
557 // not being used as part of a render pass, setting it here forces
558 // FlippedFramebuffer to return |true|.
559 const DrawingFrame* force_drawing_frame_framebuffer_flipped_;
560
537 BoundGeometry bound_geometry_; 561 BoundGeometry bound_geometry_;
538 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 562 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
539 }; 563 };
540 564
541 } // namespace cc 565 } // namespace cc
542 566
543 #endif // CC_OUTPUT_GL_RENDERER_H_ 567 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698