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

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

Issue 470973002: gpu: Remove WebGraphicsContext3D::makeContextCurrent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix in unittests Created 6 years, 3 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 "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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 bool ContextProviderInProcess::BindToCurrentThread() { 89 bool ContextProviderInProcess::BindToCurrentThread() {
90 DCHECK(context3d_); 90 DCHECK(context3d_);
91 91
92 // This is called on the thread the context will be used. 92 // This is called on the thread the context will be used.
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_->makeContextCurrent()) 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_->pushGroupMarkerEXT(unique_context_name.c_str());
106 106
107 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this)); 107 lost_context_callback_proxy_.reset(new LostContextCallbackProxy(this));
108 return true; 108 return true;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 lost_context_callback_ = lost_context_callback; 207 lost_context_callback_ = lost_context_callback;
208 } 208 }
209 209
210 void ContextProviderInProcess::SetMemoryPolicyChangedCallback( 210 void ContextProviderInProcess::SetMemoryPolicyChangedCallback(
211 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 211 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
212 // There's no memory manager for the in-process implementation. 212 // There's no memory manager for the in-process implementation.
213 } 213 }
214 214
215 } // namespace gpu 215 } // namespace gpu
216 } // namespace webkit 216 } // namespace webkit
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/TestPlugin.cpp ('k') | webkit/common/gpu/grcontext_for_webgraphicscontext3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698