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

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

Issue 2643623004: content: Add overdraw feedback support for X11 ChromeOS builds. (Closed)
Patch Set: add todo 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
« no previous file with comments | « content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus_browser_compositor_output_surface.h" 5 #include "content/browser/compositor/mus_browser_compositor_output_surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/output_surface_frame.h" 10 #include "cc/output/output_surface_frame.h"
(...skipping 14 matching lines...) Expand all
25 25
26 MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface( 26 MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface(
27 ui::Window* window, 27 ui::Window* window,
28 scoped_refptr<ui::ContextProviderCommandBuffer> context, 28 scoped_refptr<ui::ContextProviderCommandBuffer> context,
29 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 29 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
30 const UpdateVSyncParametersCallback& update_vsync_parameters_callback, 30 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
31 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 31 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
32 overlay_candidate_validator) 32 overlay_candidate_validator)
33 : GpuBrowserCompositorOutputSurface(std::move(context), 33 : GpuBrowserCompositorOutputSurface(std::move(context),
34 update_vsync_parameters_callback, 34 update_vsync_parameters_callback,
35 std::move(overlay_candidate_validator)), 35 std::move(overlay_candidate_validator),
36 false /* support_stencil */),
36 ui_window_(window), 37 ui_window_(window),
37 window_(nullptr), 38 window_(nullptr),
38 begin_frame_source_(nullptr) { 39 begin_frame_source_(nullptr) {
39 ui_compositor_frame_sink_ = ui_window_->RequestCompositorFrameSink( 40 ui_compositor_frame_sink_ = ui_window_->RequestCompositorFrameSink(
40 context, gpu_memory_buffer_manager); 41 context, gpu_memory_buffer_manager);
41 ui_compositor_frame_sink_->BindToClient(this); 42 ui_compositor_frame_sink_->BindToClient(this);
42 } 43 }
43 44
44 MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface( 45 MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface(
45 aura::Window* window, 46 aura::Window* window,
46 scoped_refptr<ui::ContextProviderCommandBuffer> context, 47 scoped_refptr<ui::ContextProviderCommandBuffer> context,
47 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 48 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
48 const UpdateVSyncParametersCallback& update_vsync_parameters_callback, 49 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
49 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 50 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
50 overlay_candidate_validator) 51 overlay_candidate_validator)
51 : GpuBrowserCompositorOutputSurface(std::move(context), 52 : GpuBrowserCompositorOutputSurface(std::move(context),
52 update_vsync_parameters_callback, 53 update_vsync_parameters_callback,
53 std::move(overlay_candidate_validator)), 54 std::move(overlay_candidate_validator),
55 false /* support_stencil */),
54 ui_window_(nullptr), 56 ui_window_(nullptr),
55 window_(window), 57 window_(window),
56 begin_frame_source_(nullptr) { 58 begin_frame_source_(nullptr) {
57 aura::WindowPortMus* window_port = aura::WindowPortMus::Get(window_); 59 aura::WindowPortMus* window_port = aura::WindowPortMus::Get(window_);
58 DCHECK(window_port); 60 DCHECK(window_port);
59 compositor_frame_sink_ = window_port->RequestCompositorFrameSink( 61 compositor_frame_sink_ = window_port->RequestCompositorFrameSink(
60 context, gpu_memory_buffer_manager); 62 context, gpu_memory_buffer_manager);
61 compositor_frame_sink_->BindToClient(this); 63 compositor_frame_sink_->BindToClient(this);
62 } 64 }
63 65
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 208
207 const gpu::Mailbox& MusBrowserCompositorOutputSurface::GetMailboxFromResourceId( 209 const gpu::Mailbox& MusBrowserCompositorOutputSurface::GetMailboxFromResourceId(
208 uint32_t id) { 210 uint32_t id) {
209 DCHECK_LT(id, mailboxes_.size()); 211 DCHECK_LT(id, mailboxes_.size());
210 DCHECK(std::find(free_resource_ids_.begin(), free_resource_ids_.end(), id) == 212 DCHECK(std::find(free_resource_ids_.begin(), free_resource_ids_.end(), id) ==
211 free_resource_ids_.end()); 213 free_resource_ids_.end());
212 return mailboxes_[id]; 214 return mailboxes_[id];
213 } 215 }
214 216
215 } // namespace content 217 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698