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

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

Issue 780653007: Added GL_CHROMIUM_trace_marker feature as well as gpu_toplevel markers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed endtrace calls Created 6 years 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) 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 <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (lost_context_callback_proxy_) 95 if (lost_context_callback_proxy_)
96 return true; 96 return true;
97 97
98 if (!context3d_->InitializeOnCurrentThread()) 98 if (!context3d_->InitializeOnCurrentThread())
99 return false; 99 return false;
100 100
101 InitializeCapabilities(); 101 InitializeCapabilities();
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_->pushGroupMarkerEXT(unique_context_name.c_str()); 105 context3d_->traceBeginCHROMIUM("gpu_toplevel",
106 unique_context_name.c_str());
106 107
107 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this)); 108 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this));
108 return true; 109 return true;
109 } 110 }
110 111
111 void ContextProviderInProcess::InitializeCapabilities() { 112 void ContextProviderInProcess::InitializeCapabilities() {
112 capabilities_.gpu = context3d_->GetImplementation()->capabilities(); 113 capabilities_.gpu = context3d_->GetImplementation()->capabilities();
113 114
114 size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit(); 115 size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit();
115 capabilities_.max_transfer_buffer_usage_bytes = 116 capabilities_.max_transfer_buffer_usage_bytes =
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 lost_context_callback_ = lost_context_callback; 208 lost_context_callback_ = lost_context_callback;
208 } 209 }
209 210
210 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( 211 void ContextProviderInProcess::SetMemoryPolicyChangedCallback(
211 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 212 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
212 // There's no memory manager for the in-process implementation. 213 // There's no memory manager for the in-process implementation.
213 } 214 }
214 215
215 } // namespace gpu 216 } // namespace gpu
216 } // namespace webkit 217 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698