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

Side by Side Diff: gpu/ipc/in_process_command_buffer.cc

Issue 2692063004: Release gpu::ContextGroup in gpu::InProcessCommandBuffer on GPU thread (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | 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 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 "gpu/ipc/in_process_command_buffer.h" 5 #include "gpu/ipc/in_process_command_buffer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 decoder_.reset(); 458 decoder_.reset();
459 } 459 }
460 context_ = nullptr; 460 context_ = nullptr;
461 surface_ = nullptr; 461 surface_ = nullptr;
462 sync_point_client_ = nullptr; 462 sync_point_client_ = nullptr;
463 if (sync_point_order_data_) { 463 if (sync_point_order_data_) {
464 sync_point_order_data_->Destroy(); 464 sync_point_order_data_->Destroy();
465 sync_point_order_data_ = nullptr; 465 sync_point_order_data_ = nullptr;
466 } 466 }
467 gl_share_group_ = nullptr; 467 gl_share_group_ = nullptr;
468 context_group_ = nullptr;
468 469
469 base::AutoLock lock(task_queue_lock_); 470 base::AutoLock lock(task_queue_lock_);
470 std::queue<std::unique_ptr<GpuTask>> empty; 471 std::queue<std::unique_ptr<GpuTask>> empty;
471 task_queue_.swap(empty); 472 task_queue_.swap(empty);
472 473
473 return true; 474 return true;
474 } 475 }
475 476
476 void InProcessCommandBuffer::CheckSequencedThread() { 477 void InProcessCommandBuffer::CheckSequencedThread() {
477 DCHECK(!sequence_checker_ || sequence_checker_->CalledOnValidSequence()); 478 DCHECK(!sequence_checker_ || sequence_checker_->CalledOnValidSequence());
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 return wrapped_callback; 1147 return wrapped_callback;
1147 } 1148 }
1148 1149
1149 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, 1150 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback,
1150 uint32_t order_number) 1151 uint32_t order_number)
1151 : callback(callback), order_number(order_number) {} 1152 : callback(callback), order_number(order_number) {}
1152 1153
1153 InProcessCommandBuffer::GpuTask::~GpuTask() {} 1154 InProcessCommandBuffer::GpuTask::~GpuTask() {}
1154 1155
1155 } // namespace gpu 1156 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698