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

Side by Side Diff: content/browser/android/in_process/context_provider_in_process.cc

Issue 1132283003: Merge Group Markers into Chromium Traces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed extra c_str() call Created 5 years, 7 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) 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 "content/browser/android/in_process/context_provider_in_process.h" 5 #include "content/browser/android/in_process/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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 DCHECK(context_thread_checker_.CalledOnValidThread()); 93 DCHECK(context_thread_checker_.CalledOnValidThread());
94 94
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 const 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());
vmiura 2015/05/12 21:47:41 Same, suggest keeping only traceBeginCHROMIUM vers
105 context3d_->traceBeginCHROMIUM("gpu_toplevel", 106 context3d_->traceBeginCHROMIUM("gpu_toplevel",
106 unique_context_name.c_str()); 107 unique_context_name.c_str());
107 108
108 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this)); 109 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this));
109 return true; 110 return true;
110 } 111 }
111 112
112 void ContextProviderInProcess::DetachFromThread() { 113 void ContextProviderInProcess::DetachFromThread() {
113 context_thread_checker_.DetachFromThread(); 114 context_thread_checker_.DetachFromThread();
114 } 115 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 lost_context_callback.is_null()); 227 lost_context_callback.is_null());
227 lost_context_callback_ = lost_context_callback; 228 lost_context_callback_ = lost_context_callback;
228 } 229 }
229 230
230 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( 231 void ContextProviderInProcess::SetMemoryPolicyChangedCallback(
231 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 232 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
232 // There's no memory manager for the in-process implementation. 233 // There's no memory manager for the in-process implementation.
233 } 234 }
234 235
235 } // namespace content 236 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698