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

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

Issue 2646243002: Use IDCompositionSurface to implement DirectCompositionSurfaceWin. (Closed)
Patch Set: add unittest and move implementation around Created 3 years, 10 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void DisplayOutputSurface::EnsureBackbuffer() {} 47 void DisplayOutputSurface::EnsureBackbuffer() {}
48 48
49 void DisplayOutputSurface::DiscardBackbuffer() { 49 void DisplayOutputSurface::DiscardBackbuffer() {
50 context_provider()->ContextGL()->DiscardBackbufferCHROMIUM(); 50 context_provider()->ContextGL()->DiscardBackbufferCHROMIUM();
51 } 51 }
52 52
53 void DisplayOutputSurface::BindFramebuffer() { 53 void DisplayOutputSurface::BindFramebuffer() {
54 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); 54 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
55 } 55 }
56 56
57 void DisplayOutputSurface::SetDrawRectangle(const gfx::Rect& draw_rectangle) {}
58
57 void DisplayOutputSurface::Reshape(const gfx::Size& size, 59 void DisplayOutputSurface::Reshape(const gfx::Size& size,
58 float device_scale_factor, 60 float device_scale_factor,
59 const gfx::ColorSpace& color_space, 61 const gfx::ColorSpace& color_space,
60 bool has_alpha, 62 bool has_alpha,
61 bool use_stencil) { 63 bool use_stencil) {
62 context_provider()->ContextGL()->ResizeCHROMIUM( 64 context_provider()->ContextGL()->ResizeCHROMIUM(
63 size.width(), size.height(), device_scale_factor, has_alpha); 65 size.width(), size.height(), device_scale_factor, has_alpha);
64 } 66 }
65 67
66 void DisplayOutputSurface::SwapBuffers(cc::OutputSurfaceFrame frame) { 68 void DisplayOutputSurface::SwapBuffers(cc::OutputSurfaceFrame frame) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 118
117 void DisplayOutputSurface::OnVSyncParametersUpdated(base::TimeTicks timebase, 119 void DisplayOutputSurface::OnVSyncParametersUpdated(base::TimeTicks timebase,
118 base::TimeDelta interval) { 120 base::TimeDelta interval) {
119 // TODO(brianderson): We should not be receiving 0 intervals. 121 // TODO(brianderson): We should not be receiving 0 intervals.
120 synthetic_begin_frame_source_->OnUpdateVSyncParameters( 122 synthetic_begin_frame_source_->OnUpdateVSyncParameters(
121 timebase, 123 timebase,
122 interval.is_zero() ? cc::BeginFrameArgs::DefaultInterval() : interval); 124 interval.is_zero() ? cc::BeginFrameArgs::DefaultInterval() : interval);
123 } 125 }
124 126
125 } // namespace ui 127 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698