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

Side by Side Diff: webkit/common/gpu/context_provider_in_process.cc

Issue 916723002: cc: Add threaded GPU rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement ContextProviderInProcess::DetachFromThread(). Created 5 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 | « webkit/common/gpu/context_provider_in_process.h ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "webkit/common/gpu/context_provider_in_process.h" 5 #include "webkit/common/gpu/context_provider_in_process.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "cc/output/managed_memory_policy.h" 10 #include "cc/output/managed_memory_policy.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 std::string unique_context_name = 103 std::string unique_context_name =
104 base::StringPrintf("%s-%p", debug_name_.c_str(), context3d_.get()); 104 base::StringPrintf("%s-%p", debug_name_.c_str(), context3d_.get());
105 context3d_->traceBeginCHROMIUM("gpu_toplevel", 105 context3d_->traceBeginCHROMIUM("gpu_toplevel",
106 unique_context_name.c_str()); 106 unique_context_name.c_str());
107 107
108 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this)); 108 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this));
109 return true; 109 return true;
110 } 110 }
111 111
112 void ContextProviderInProcess::DetachFromThread() {
vmiura 2015/02/13 22:06:43 Added this.
113 context_thread_checker_.DetachFromThread();
114 }
115
112 void ContextProviderInProcess::InitializeCapabilities() { 116 void ContextProviderInProcess::InitializeCapabilities() {
113 capabilities_.gpu = context3d_->GetImplementation()->capabilities(); 117 capabilities_.gpu = context3d_->GetImplementation()->capabilities();
114 118
115 size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit(); 119 size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit();
116 capabilities_.max_transfer_buffer_usage_bytes = 120 capabilities_.max_transfer_buffer_usage_bytes =
117 mapped_memory_limit == 121 mapped_memory_limit ==
118 WebGraphicsContext3DInProcessCommandBufferImpl::kNoLimit 122 WebGraphicsContext3DInProcessCommandBufferImpl::kNoLimit
119 ? std::numeric_limits<size_t>::max() 123 ? std::numeric_limits<size_t>::max()
120 : mapped_memory_limit; 124 : mapped_memory_limit;
121 } 125 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 lost_context_callback_ = lost_context_callback; 218 lost_context_callback_ = lost_context_callback;
215 } 219 }
216 220
217 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( 221 void ContextProviderInProcess::SetMemoryPolicyChangedCallback(
218 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 222 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
219 // There's no memory manager for the in-process implementation. 223 // There's no memory manager for the in-process implementation.
220 } 224 }
221 225
222 } // namespace gpu 226 } // namespace gpu
223 } // namespace webkit 227 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/common/gpu/context_provider_in_process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698