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

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

Issue 1124523003: Revert of Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_surfaceless_browser_compositor_output_s urface.h" 5 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h" 8 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h"
9 #include "content/browser/compositor/buffer_queue.h" 9 #include "content/browser/compositor/buffer_queue.h"
10 #include "content/browser/compositor/reflector_impl.h" 10 #include "content/browser/compositor/reflector_impl.h"
11 #include "content/browser/gpu/gpu_surface_tracker.h" 11 #include "content/browser/gpu/gpu_surface_tracker.h"
12 #include "content/common/gpu/client/context_provider_command_buffer.h" 12 #include "content/common/gpu/client/context_provider_command_buffer.h"
13 #include "content/common/gpu/client/gl_helper.h" 13 #include "content/common/gpu/client/gl_helper.h"
14 #include "gpu/GLES2/gl2extchromium.h" 14 #include "gpu/GLES2/gl2extchromium.h"
15 #include "gpu/command_buffer/client/gles2_interface.h" 15 #include "gpu/command_buffer/client/gles2_interface.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 GpuSurfacelessBrowserCompositorOutputSurface:: 19 GpuSurfacelessBrowserCompositorOutputSurface::
20 GpuSurfacelessBrowserCompositorOutputSurface( 20 GpuSurfacelessBrowserCompositorOutputSurface(
21 const scoped_refptr<ContextProviderCommandBuffer>& context, 21 const scoped_refptr<ContextProviderCommandBuffer>& context,
22 int surface_id, 22 int surface_id,
23 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
23 scoped_ptr<BrowserCompositorOverlayCandidateValidator> 24 scoped_ptr<BrowserCompositorOverlayCandidateValidator>
24 overlay_candidate_validator, 25 overlay_candidate_validator,
25 unsigned internalformat, 26 unsigned internalformat,
26 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager) 27 BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager)
27 : GpuBrowserCompositorOutputSurface(context, 28 : GpuBrowserCompositorOutputSurface(context,
29 vsync_manager,
28 overlay_candidate_validator.Pass()), 30 overlay_candidate_validator.Pass()),
29 internalformat_(internalformat), 31 internalformat_(internalformat),
30 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { 32 gpu_memory_buffer_manager_(gpu_memory_buffer_manager) {
31 capabilities_.uses_default_gl_framebuffer = false; 33 capabilities_.uses_default_gl_framebuffer = false;
32 capabilities_.flipped_output_surface = true; 34 capabilities_.flipped_output_surface = true;
33 // Set |max_frames_pending| to 2 for surfaceless, which aligns scheduling 35 // Set |max_frames_pending| to 2 for surfaceless, which aligns scheduling
34 // more closely with the previous surfaced behavior. 36 // more closely with the previous surfaced behavior.
35 // With a surface, swap buffer ack used to return early, before actually 37 // With a surface, swap buffer ack used to return early, before actually
36 // presenting the back buffer, enabling the browser compositor to run ahead. 38 // presenting the back buffer, enabling the browser compositor to run ahead.
37 // Surfaceless implementation acks at the time of actual buffer swap, which 39 // Surfaceless implementation acks at the time of actual buffer swap, which
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 88
87 void GpuSurfacelessBrowserCompositorOutputSurface::Reshape( 89 void GpuSurfacelessBrowserCompositorOutputSurface::Reshape(
88 const gfx::Size& size, 90 const gfx::Size& size,
89 float scale_factor) { 91 float scale_factor) {
90 GpuBrowserCompositorOutputSurface::Reshape(size, scale_factor); 92 GpuBrowserCompositorOutputSurface::Reshape(size, scale_factor);
91 DCHECK(output_surface_); 93 DCHECK(output_surface_);
92 output_surface_->Reshape(SurfaceSize(), scale_factor); 94 output_surface_->Reshape(SurfaceSize(), scale_factor);
93 } 95 }
94 96
95 } // namespace content 97 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698