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

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 2174203002: OnDrawHardware() implementation with async messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added flag to branch old and new implementation Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gpu/gpu_child_thread.h" 5 #include "content/gpu/gpu_child_thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 in_browser_process_(true), 175 in_browser_process_(true),
176 gpu_memory_buffer_factory_(gpu_memory_buffer_factory) { 176 gpu_memory_buffer_factory_(gpu_memory_buffer_factory) {
177 #if defined(OS_WIN) 177 #if defined(OS_WIN)
178 target_services_ = NULL; 178 target_services_ = NULL;
179 #endif 179 #endif
180 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 180 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
181 switches::kSingleProcess) || 181 switches::kSingleProcess) ||
182 base::CommandLine::ForCurrentProcess()->HasSwitch( 182 base::CommandLine::ForCurrentProcess()->HasSwitch(
183 switches::kInProcessGPU)); 183 switches::kInProcessGPU));
184 184
185 if (!gl::init::InitializeGLOneOff()) 185 // if (!gl::init::InitializeGLOneOff())
186 VLOG(1) << "gl::init::InitializeGLOneOff failed"; 186 // VLOG(1) << "gl::init::InitializeGLOneOff failed";
187 187
188 g_thread_safe_sender.Get() = thread_safe_sender(); 188 g_thread_safe_sender.Get() = thread_safe_sender();
189 } 189 }
190 190
191 GpuChildThread::~GpuChildThread() { 191 GpuChildThread::~GpuChildThread() {
192 while (!deferred_messages_.empty()) { 192 while (!deferred_messages_.empty()) {
193 delete deferred_messages_.front(); 193 delete deferred_messages_.front();
194 deferred_messages_.pop(); 194 deferred_messages_.pop();
195 } 195 }
196 } 196 }
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 556
557 void GpuChildThread::BindProcessControlRequest( 557 void GpuChildThread::BindProcessControlRequest(
558 mojom::ProcessControlRequest request) { 558 mojom::ProcessControlRequest request) {
559 DVLOG(1) << "GPU: Binding ProcessControl request"; 559 DVLOG(1) << "GPU: Binding ProcessControl request";
560 DCHECK(process_control_); 560 DCHECK(process_control_);
561 process_control_bindings_.AddBinding(process_control_.get(), 561 process_control_bindings_.AddBinding(process_control_.get(),
562 std::move(request)); 562 std::move(request));
563 } 563 }
564 564
565 } // namespace content 565 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698