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

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

Issue 2743663006: Allow switching DirectCompositionSurfaceWin between drawing modes. (Closed)
Patch Set: rebase Created 3 years, 9 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/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.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 #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
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
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
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698