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 #include "cc/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2457 | 2457 |
2458 ScheduleCALayers(); | 2458 ScheduleCALayers(); |
2459 ScheduleDCLayers(); | 2459 ScheduleDCLayers(); |
2460 ScheduleOverlays(); | 2460 ScheduleOverlays(); |
2461 } | 2461 } |
2462 | 2462 |
2463 void GLRenderer::FinishDrawingQuadList() { | 2463 void GLRenderer::FinishDrawingQuadList() { |
2464 FlushTextureQuadCache(SHARED_BINDING); | 2464 FlushTextureQuadCache(SHARED_BINDING); |
2465 } | 2465 } |
2466 | 2466 |
| 2467 void GLRenderer::SetEnableDCLayers(bool enable) { |
| 2468 gl_->SetEnableDCLayersCHROMIUM(enable); |
| 2469 } |
| 2470 |
2467 bool GLRenderer::FlippedFramebuffer() const { | 2471 bool GLRenderer::FlippedFramebuffer() const { |
2468 if (force_drawing_frame_framebuffer_unflipped_) | 2472 if (force_drawing_frame_framebuffer_unflipped_) |
2469 return false; | 2473 return false; |
2470 if (current_frame()->current_render_pass != current_frame()->root_render_pass) | 2474 if (current_frame()->current_render_pass != current_frame()->root_render_pass) |
2471 return true; | 2475 return true; |
2472 return FlippedRootFramebuffer(); | 2476 return FlippedRootFramebuffer(); |
2473 } | 2477 } |
2474 | 2478 |
2475 bool GLRenderer::FlippedRootFramebuffer() const { | 2479 bool GLRenderer::FlippedRootFramebuffer() const { |
2476 // GL is normally flipped, so a flipped output results in an unflipping. | 2480 // GL is normally flipped, so a flipped output results in an unflipping. |
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3582 return; | 3586 return; |
3583 | 3587 |
3584 // Report GPU overdraw as a percentage of |max_result|. | 3588 // Report GPU overdraw as a percentage of |max_result|. |
3585 TRACE_COUNTER1( | 3589 TRACE_COUNTER1( |
3586 TRACE_DISABLED_BY_DEFAULT("cc.debug.overdraw"), "GPU Overdraw", | 3590 TRACE_DISABLED_BY_DEFAULT("cc.debug.overdraw"), "GPU Overdraw", |
3587 (std::accumulate(overdraw->begin(), overdraw->end(), 0) * 100) / | 3591 (std::accumulate(overdraw->begin(), overdraw->end(), 0) * 100) / |
3588 max_result); | 3592 max_result); |
3589 } | 3593 } |
3590 | 3594 |
3591 } // namespace cc | 3595 } // namespace cc |
OLD | NEW |