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

Side by Side Diff: content/renderer/android/synchronous_compositor_output_surface.cc

Issue 2009443002: Revert of Consolidate OutputSurface constructors into GL vs Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/android/synchronous_compositor_output_surface.h" 5 #include "content/renderer/android/synchronous_compositor_output_surface.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h"
13 #include "cc/output/compositor_frame.h" 12 #include "cc/output/compositor_frame.h"
14 #include "cc/output/context_provider.h" 13 #include "cc/output/context_provider.h"
15 #include "cc/output/output_surface_client.h" 14 #include "cc/output/output_surface_client.h"
16 #include "cc/output/software_output_device.h" 15 #include "cc/output/software_output_device.h"
17 #include "content/common/android/sync_compositor_messages.h" 16 #include "content/common/android/sync_compositor_messages.h"
18 #include "content/renderer/android/synchronous_compositor_external_begin_frame_s ource.h" 17 #include "content/renderer/android/synchronous_compositor_external_begin_frame_s ource.h"
19 #include "content/renderer/android/synchronous_compositor_filter.h" 18 #include "content/renderer/android/synchronous_compositor_filter.h"
20 #include "content/renderer/android/synchronous_compositor_registry.h" 19 #include "content/renderer/android/synchronous_compositor_registry.h"
21 #include "content/renderer/gpu/frame_swap_message_queue.h" 20 #include "content/renderer/gpu/frame_swap_message_queue.h"
22 #include "content/renderer/render_thread_impl.h" 21 #include "content/renderer/render_thread_impl.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void EndPaint() override {} 62 void EndPaint() override {}
64 63
65 private: 64 private:
66 SynchronousCompositorOutputSurface* surface_; 65 SynchronousCompositorOutputSurface* surface_;
67 SkCanvas null_canvas_; 66 SkCanvas null_canvas_;
68 67
69 DISALLOW_COPY_AND_ASSIGN(SoftwareDevice); 68 DISALLOW_COPY_AND_ASSIGN(SoftwareDevice);
70 }; 69 };
71 70
72 SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface( 71 SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface(
73 scoped_refptr<cc::ContextProvider> context_provider, 72 const scoped_refptr<cc::ContextProvider>& context_provider,
74 scoped_refptr<cc::ContextProvider> worker_context_provider, 73 const scoped_refptr<cc::ContextProvider>& worker_context_provider,
75 int routing_id, 74 int routing_id,
76 uint32_t output_surface_id, 75 uint32_t output_surface_id,
77 SynchronousCompositorRegistry* registry, 76 SynchronousCompositorRegistry* registry,
78 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue) 77 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue)
79 : cc::OutputSurface(std::move(context_provider), 78 : cc::OutputSurface(
80 std::move(worker_context_provider), 79 context_provider,
81 base::MakeUnique<SoftwareDevice>(this)), 80 worker_context_provider,
81 nullptr,
82 std::unique_ptr<cc::SoftwareOutputDevice>(new SoftwareDevice(this))),
82 routing_id_(routing_id), 83 routing_id_(routing_id),
83 output_surface_id_(output_surface_id), 84 output_surface_id_(output_surface_id),
84 registry_(registry), 85 registry_(registry),
85 sender_(RenderThreadImpl::current()->sync_compositor_message_filter()), 86 sender_(RenderThreadImpl::current()->sync_compositor_message_filter()),
86 registered_(false), 87 registered_(false),
87 sync_client_(nullptr), 88 sync_client_(nullptr),
88 current_sw_canvas_(nullptr), 89 current_sw_canvas_(nullptr),
89 memory_policy_(0u), 90 memory_policy_(0u),
90 did_swap_(false), 91 did_swap_(false),
91 frame_swap_message_queue_(frame_swap_message_queue), 92 frame_swap_message_queue_(frame_swap_message_queue),
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) { 304 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) {
304 DCHECK(CalledOnValidThread()); 305 DCHECK(CalledOnValidThread());
305 return sender_->Send(message); 306 return sender_->Send(message);
306 } 307 }
307 308
308 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 309 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
309 return thread_checker_.CalledOnValidThread(); 310 return thread_checker_.CalledOnValidThread();
310 } 311 }
311 312
312 } // namespace content 313 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.h ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698