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

Side by Side Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 775143003: cc: Implement unified BeginFrame on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unittest Created 5 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
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 "content/browser/compositor/gpu_browser_compositor_output_surface.h" 5 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/output/output_surface_client.h" 8 #include "cc/output/output_surface_client.h"
9 #include "content/browser/compositor/reflector_impl.h" 9 #include "content/browser/compositor/reflector_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
11 #include "content/common/gpu/client/context_provider_command_buffer.h" 11 #include "content/common/gpu/client/context_provider_command_buffer.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "gpu/command_buffer/client/context_support.h" 13 #include "gpu/command_buffer/client/context_support.h"
14 #include "gpu/command_buffer/client/gles2_interface.h" 14 #include "gpu/command_buffer/client/gles2_interface.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface( 18 GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface(
19 const scoped_refptr<ContextProviderCommandBuffer>& context, 19 const scoped_refptr<ContextProviderCommandBuffer>& context,
20 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
21 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator) 20 scoped_ptr<cc::OverlayCandidateValidator> overlay_candidate_validator)
22 : BrowserCompositorOutputSurface(context, 21 : BrowserCompositorOutputSurface(context),
23 vsync_manager),
24 #if defined(OS_MACOSX) 22 #if defined(OS_MACOSX)
25 should_not_show_frames_(false), 23 should_not_show_frames_(false),
26 #endif 24 #endif
27 swap_buffers_completion_callback_( 25 swap_buffers_completion_callback_(
28 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted, 26 base::Bind(&GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted,
29 base::Unretained(this))), 27 base::Unretained(this))),
30 update_vsync_parameters_callback_(base::Bind( 28 update_vsync_parameters_callback_(base::Bind(
31 &BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu, 29 &BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu,
32 base::Unretained(this))) { 30 base::Unretained(this))) {
33 overlay_candidate_validator_ = overlay_candidate_validator.Pass(); 31 overlay_candidate_validator_ = overlay_candidate_validator.Pass();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 should_not_show_frames_ = true; 126 should_not_show_frames_ = true;
129 } 127 }
130 128
131 bool GpuBrowserCompositorOutputSurface::ShouldNotShowFramesAfterRecycle() 129 bool GpuBrowserCompositorOutputSurface::ShouldNotShowFramesAfterRecycle()
132 const { 130 const {
133 return should_not_show_frames_; 131 return should_not_show_frames_;
134 } 132 }
135 #endif 133 #endif
136 134
137 } // namespace content 135 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698