| OLD | NEW |
| 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 Loading... |
| 263 const CALayerOverlay* ca_layer_overlay, | 263 const CALayerOverlay* ca_layer_overlay, |
| 264 Resource** resource, | 264 Resource** resource, |
| 265 DrawingFrame* frame, | 265 DrawingFrame* frame, |
| 266 gfx::RectF* new_bounds); | 266 gfx::RectF* new_bounds); |
| 267 | 267 |
| 268 // Schedules the |ca_layer_overlay|, which is guaranteed to have a non-null | 268 // Schedules the |ca_layer_overlay|, which is guaranteed to have a non-null |
| 269 // |rpdq| parameter. | 269 // |rpdq| parameter. |
| 270 void ScheduleRenderPassDrawQuad(const CALayerOverlay* ca_layer_overlay, | 270 void ScheduleRenderPassDrawQuad(const CALayerOverlay* ca_layer_overlay, |
| 271 DrawingFrame* external_frame); | 271 DrawingFrame* external_frame); |
| 272 | 272 |
| 273 // Setup/flush all pending overdraw feedback to framebuffer. |
| 274 void SetupOverdrawFeedback(); |
| 275 void FlushOverdrawFeedback(const DrawingFrame* frame, |
| 276 const gfx::Rect& output_rect); |
| 277 // Process overdraw feedback from query. |
| 278 using OverdrawFeedbackCallback = base::Callback<void(unsigned, int)>; |
| 279 void ProcessOverdrawFeedback(std::vector<int>* overdraw, |
| 280 size_t num_expected_results, |
| 281 unsigned query, |
| 282 int multiplier); |
| 283 |
| 273 using OverlayResourceLock = | 284 using OverlayResourceLock = |
| 274 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; | 285 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; |
| 275 using OverlayResourceLockList = std::vector<OverlayResourceLock>; | 286 using OverlayResourceLockList = std::vector<OverlayResourceLock>; |
| 276 | 287 |
| 277 // Resources that have been sent to the GPU process, but not yet swapped. | 288 // Resources that have been sent to the GPU process, but not yet swapped. |
| 278 OverlayResourceLockList pending_overlay_resources_; | 289 OverlayResourceLockList pending_overlay_resources_; |
| 279 | 290 |
| 280 // Resources that should be shortly swapped by the GPU process. | 291 // Resources that should be shortly swapped by the GPU process. |
| 281 std::deque<OverlayResourceLockList> swapping_overlay_resources_; | 292 std::deque<OverlayResourceLockList> swapping_overlay_resources_; |
| 282 | 293 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 // The method FlippedFramebuffer determines whether the framebuffer associated | 357 // The method FlippedFramebuffer determines whether the framebuffer associated |
| 347 // with a DrawingFrame is flipped. It makes the assumption that the | 358 // with a DrawingFrame is flipped. It makes the assumption that the |
| 348 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is | 359 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is |
| 349 // not being used as part of a render pass, setting it here forces | 360 // not being used as part of a render pass, setting it here forces |
| 350 // FlippedFramebuffer to return |true|. | 361 // FlippedFramebuffer to return |true|. |
| 351 bool force_drawing_frame_framebuffer_unflipped_ = false; | 362 bool force_drawing_frame_framebuffer_unflipped_ = false; |
| 352 | 363 |
| 353 BoundGeometry bound_geometry_; | 364 BoundGeometry bound_geometry_; |
| 354 ColorLUTCache color_lut_cache_; | 365 ColorLUTCache color_lut_cache_; |
| 355 | 366 |
| 367 unsigned offscreen_stencil_renderbuffer_id_ = 0; |
| 368 gfx::Size offscreen_stencil_renderbuffer_size_; |
| 369 |
| 356 base::WeakPtrFactory<GLRenderer> weak_ptr_factory_; | 370 base::WeakPtrFactory<GLRenderer> weak_ptr_factory_; |
| 357 | 371 |
| 358 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 372 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 359 }; | 373 }; |
| 360 | 374 |
| 361 } // namespace cc | 375 } // namespace cc |
| 362 | 376 |
| 363 #endif // CC_OUTPUT_GL_RENDERER_H_ | 377 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |