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

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

Issue 1931213002: display_compositor: Move CompositorOverlayCandidateValidator from content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DONE_2016.04.28_dc-overlay-candidate-validator
Patch Set: . Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/offscreen_browser_compositor_output_surface .h" 5 #include "content/browser/compositor/offscreen_browser_compositor_output_surface .h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "cc/output/compositor_frame.h" 11 #include "cc/output/compositor_frame.h"
12 #include "cc/output/compositor_frame_ack.h" 12 #include "cc/output/compositor_frame_ack.h"
13 #include "cc/output/gl_frame_data.h" 13 #include "cc/output/gl_frame_data.h"
14 #include "cc/output/output_surface_client.h" 14 #include "cc/output/output_surface_client.h"
15 #include "cc/resources/resource_provider.h" 15 #include "cc/resources/resource_provider.h"
16 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h" 16 #include "components/display_compositor/compositor_overlay_candidate_validator.h "
17 #include "content/browser/compositor/reflector_impl.h" 17 #include "content/browser/compositor/reflector_impl.h"
18 #include "content/browser/compositor/reflector_texture.h" 18 #include "content/browser/compositor/reflector_texture.h"
19 #include "content/common/gpu/client/context_provider_command_buffer.h" 19 #include "content/common/gpu/client/context_provider_command_buffer.h"
20 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
21 #include "gpu/command_buffer/client/context_support.h" 21 #include "gpu/command_buffer/client/context_support.h"
22 #include "gpu/command_buffer/client/gles2_interface.h" 22 #include "gpu/command_buffer/client/gles2_interface.h"
23 #include "third_party/khronos/GLES2/gl2.h" 23 #include "third_party/khronos/GLES2/gl2.h"
24 #include "third_party/khronos/GLES2/gl2ext.h" 24 #include "third_party/khronos/GLES2/gl2ext.h"
25 25
26 using cc::CompositorFrame; 26 using cc::CompositorFrame;
27 using cc::GLFrameData; 27 using cc::GLFrameData;
28 using cc::ResourceProvider; 28 using cc::ResourceProvider;
29 using gpu::gles2::GLES2Interface; 29 using gpu::gles2::GLES2Interface;
30 30
31 namespace content { 31 namespace content {
32 32
33 OffscreenBrowserCompositorOutputSurface:: 33 OffscreenBrowserCompositorOutputSurface::
34 OffscreenBrowserCompositorOutputSurface( 34 OffscreenBrowserCompositorOutputSurface(
35 const scoped_refptr<ContextProviderCommandBuffer>& context, 35 const scoped_refptr<ContextProviderCommandBuffer>& context,
36 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, 36 const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
37 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 37 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
38 base::SingleThreadTaskRunner* task_runner, 38 base::SingleThreadTaskRunner* task_runner,
39 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> 39 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
40 overlay_candidate_validator) 40 overlay_candidate_validator)
41 : BrowserCompositorOutputSurface(context, 41 : BrowserCompositorOutputSurface(context,
42 worker_context, 42 worker_context,
43 vsync_manager, 43 vsync_manager,
44 task_runner, 44 task_runner,
45 std::move(overlay_candidate_validator)), 45 std::move(overlay_candidate_validator)),
46 fbo_(0), 46 fbo_(0),
47 is_backbuffer_discarded_(false), 47 is_backbuffer_discarded_(false),
48 weak_ptr_factory_(this) { 48 weak_ptr_factory_(this) {
49 capabilities_.uses_default_gl_framebuffer = false; 49 capabilities_.uses_default_gl_framebuffer = false;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 #if defined(OS_MACOSX) 168 #if defined(OS_MACOSX)
169 169
170 bool OffscreenBrowserCompositorOutputSurface:: 170 bool OffscreenBrowserCompositorOutputSurface::
171 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const { 171 SurfaceShouldNotShowFramesAfterSuspendForRecycle() const {
172 return true; 172 return true;
173 } 173 }
174 174
175 #endif 175 #endif
176 176
177 } // namespace content 177 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698