cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / content / gpu / gpu_main_thread.cc
blob65fef13b3605b0793f4854feecbb7f5b933d8f03
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
3 // found in the LICENSE file.
5 #include "content/gpu/gpu_main_thread.h"
7 #include "content/gpu/gpu_child_thread.h"
8 #include "content/gpu/gpu_process.h"
10 namespace content {
12 GpuMainThread::GpuMainThread(const std::string& channel_id)
13 : base::Thread("Chrome_InProcGpuThread"),
14 channel_id_(channel_id),
15 gpu_process_(NULL) {
18 GpuMainThread::~GpuMainThread() {
19 Stop();
22 void GpuMainThread::Init() {
23 gpu_process_ = new GpuProcess();
24 // The process object takes ownership of the thread object, so do not
25 // save and delete the pointer.
26 gpu_process_->set_main_thread(new GpuChildThread(channel_id_));
29 void GpuMainThread::CleanUp() {
30 delete gpu_process_;
33 base::Thread* CreateGpuMainThread(const std::string& channel_id) {
34 return new GpuMainThread(channel_id);
37 } // namespace content