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

Side by Side Diff: services/ui/surfaces/display_output_surface.cc

Issue 2612023002: cc: Implement overdraw feedback debugging feature. (Closed)
Patch Set: make sure overdraw_feedback_ is initialized and reset properly Created 3 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/surfaces/display_output_surface.h" 5 #include "services/ui/surfaces/display_output_surface.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 context_provider()->ContextGL()->DiscardBackbufferCHROMIUM(); 48 context_provider()->ContextGL()->DiscardBackbufferCHROMIUM();
49 } 49 }
50 50
51 void DisplayOutputSurface::BindFramebuffer() { 51 void DisplayOutputSurface::BindFramebuffer() {
52 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); 52 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
53 } 53 }
54 54
55 void DisplayOutputSurface::Reshape(const gfx::Size& size, 55 void DisplayOutputSurface::Reshape(const gfx::Size& size,
56 float device_scale_factor, 56 float device_scale_factor,
57 const gfx::ColorSpace& color_space, 57 const gfx::ColorSpace& color_space,
58 bool has_alpha) { 58 bool has_alpha,
59 bool use_stencil) {
59 context_provider()->ContextGL()->ResizeCHROMIUM( 60 context_provider()->ContextGL()->ResizeCHROMIUM(
60 size.width(), size.height(), device_scale_factor, has_alpha); 61 size.width(), size.height(), device_scale_factor, has_alpha);
61 } 62 }
62 63
63 void DisplayOutputSurface::SwapBuffers(cc::OutputSurfaceFrame frame) { 64 void DisplayOutputSurface::SwapBuffers(cc::OutputSurfaceFrame frame) {
64 DCHECK(context_provider_); 65 DCHECK(context_provider_);
65 if (frame.sub_buffer_rect == gfx::Rect(frame.size)) { 66 if (frame.sub_buffer_rect == gfx::Rect(frame.size)) {
66 context_provider_->ContextSupport()->Swap(); 67 context_provider_->ContextSupport()->Swap();
67 } else { 68 } else {
68 context_provider_->ContextSupport()->PartialSwapBuffers( 69 context_provider_->ContextSupport()->PartialSwapBuffers(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 void DisplayOutputSurface::OnVSyncParametersUpdated(base::TimeTicks timebase, 111 void DisplayOutputSurface::OnVSyncParametersUpdated(base::TimeTicks timebase,
111 base::TimeDelta interval) { 112 base::TimeDelta interval) {
112 // TODO(brianderson): We should not be receiving 0 intervals. 113 // TODO(brianderson): We should not be receiving 0 intervals.
113 synthetic_begin_frame_source_->OnUpdateVSyncParameters( 114 synthetic_begin_frame_source_->OnUpdateVSyncParameters(
114 timebase, 115 timebase,
115 interval.is_zero() ? cc::BeginFrameArgs::DefaultInterval() : interval); 116 interval.is_zero() ? cc::BeginFrameArgs::DefaultInterval() : interval);
116 } 117 }
117 118
118 } // namespace ui 119 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_output_surface.h ('k') | services/ui/surfaces/display_output_surface_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698