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

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

Issue 1984873002: Add logic to ResourceProvider to correctly lock GpuMemoryBuffer Resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 void RestoreGLState(); 251 void RestoreGLState();
252 void RestoreFramebuffer(DrawingFrame* frame); 252 void RestoreFramebuffer(DrawingFrame* frame);
253 253
254 void DiscardBackbuffer() override; 254 void DiscardBackbuffer() override;
255 void EnsureBackbuffer() override; 255 void EnsureBackbuffer() override;
256 void EnforceMemoryPolicy(); 256 void EnforceMemoryPolicy();
257 257
258 void ScheduleCALayers(DrawingFrame* frame); 258 void ScheduleCALayers(DrawingFrame* frame);
259 void ScheduleOverlays(DrawingFrame* frame); 259 void ScheduleOverlays(DrawingFrame* frame);
260 260
261 using OverlayResourceLockList = 261 using OverlayResourceLock =
262 std::vector<std::unique_ptr<ResourceProvider::ScopedReadLockGL>>; 262 std::unique_ptr<ResourceProvider::ScopedReadLockGpuMemoryBuffer>;
263 using OverlayResourceLockList = std::vector<OverlayResourceLock>;
264
265 // Resources that have been sent to the GPU process, but not yet swapped.
263 OverlayResourceLockList pending_overlay_resources_; 266 OverlayResourceLockList pending_overlay_resources_;
264 std::deque<OverlayResourceLockList> swapped_overlay_resources_; 267
268 // Resources that should be shortly swapped by the GPU process.
269 std::deque<OverlayResourceLockList> swapping_overlay_resources_;
270
271 // Resources that the GPU process has finished swapping.
272 std::map<ResourceId, OverlayResourceLock>
273 swapped_and_acked_overlay_resources_;
265 274
266 RendererCapabilitiesImpl capabilities_; 275 RendererCapabilitiesImpl capabilities_;
267 276
268 unsigned offscreen_framebuffer_id_; 277 unsigned offscreen_framebuffer_id_;
269 278
270 std::unique_ptr<StaticGeometryBinding> shared_geometry_; 279 std::unique_ptr<StaticGeometryBinding> shared_geometry_;
271 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; 280 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_;
272 gfx::QuadF shared_geometry_quad_; 281 gfx::QuadF shared_geometry_quad_;
273 282
274 // This block of bindings defines all of the programs used by the compositor 283 // This block of bindings defines all of the programs used by the compositor
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 531
523 SkBitmap on_demand_tile_raster_bitmap_; 532 SkBitmap on_demand_tile_raster_bitmap_;
524 ResourceId on_demand_tile_raster_resource_id_; 533 ResourceId on_demand_tile_raster_resource_id_;
525 BoundGeometry bound_geometry_; 534 BoundGeometry bound_geometry_;
526 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 535 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
527 }; 536 };
528 537
529 } // namespace cc 538 } // namespace cc
530 539
531 #endif // CC_OUTPUT_GL_RENDERER_H_ 540 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698