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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.cc

Issue 2543313002: ui/gl: rename ClearGLBindings to ShutdownGL (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/android/vr_shell/vr_shell.h" 5 #include "chrome/browser/android/vr_shell/vr_shell.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "chrome/browser/android/vr_shell/ui_elements.h" 8 #include "chrome/browser/android/vr_shell/ui_elements.h"
9 #include "chrome/browser/android/vr_shell/ui_interface.h" 9 #include "chrome/browser/android/vr_shell/ui_interface.h"
10 #include "chrome/browser/android/vr_shell/ui_scene.h" 10 #include "chrome/browser/android/vr_shell/ui_scene.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 bool RegisterVrShell(JNIEnv* env) { 205 bool RegisterVrShell(JNIEnv* env) {
206 return RegisterNativesImpl(env); 206 return RegisterNativesImpl(env);
207 } 207 }
208 208
209 VrShell::~VrShell() { 209 VrShell::~VrShell() {
210 if (delegate_ && delegate_->GetDeviceProvider()) { 210 if (delegate_ && delegate_->GetDeviceProvider()) {
211 delegate_->GetDeviceProvider()->OnGvrDelegateRemoved(); 211 delegate_->GetDeviceProvider()->OnGvrDelegateRemoved();
212 } 212 }
213 g_instance = nullptr; 213 g_instance = nullptr;
214 gl::init::ClearGLBindings(); 214 gl::init::ShutdownGL();
215 } 215 }
216 216
217 void VrShell::SetDelegate(JNIEnv* env, 217 void VrShell::SetDelegate(JNIEnv* env,
218 const base::android::JavaParamRef<jobject>& obj, 218 const base::android::JavaParamRef<jobject>& obj,
219 const base::android::JavaParamRef<jobject>& delegate) { 219 const base::android::JavaParamRef<jobject>& delegate) {
220 base::AutoLock lock(gvr_init_lock_); 220 base::AutoLock lock(gvr_init_lock_);
221 delegate_ = VrShellDelegate::GetNativeDelegate(env, delegate); 221 delegate_ = VrShellDelegate::GetNativeDelegate(env, delegate);
222 if (swap_chain_.get()) { 222 if (swap_chain_.get()) {
223 main_thread_task_runner_->PostTask( 223 main_thread_task_runner_->PostTask(
224 FROM_HERE, base::Bind(&device::GvrDeviceProvider::OnGvrDelegateReady, 224 FROM_HERE, base::Bind(&device::GvrDeviceProvider::OnGvrDelegateReady,
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 jboolean for_web_vr) { 1110 jboolean for_web_vr) {
1111 return reinterpret_cast<intptr_t>(new VrShell( 1111 return reinterpret_cast<intptr_t>(new VrShell(
1112 env, obj, content::WebContents::FromJavaWebContents(content_web_contents), 1112 env, obj, content::WebContents::FromJavaWebContents(content_web_contents),
1113 reinterpret_cast<ui::WindowAndroid*>(content_window_android), 1113 reinterpret_cast<ui::WindowAndroid*>(content_window_android),
1114 content::WebContents::FromJavaWebContents(ui_web_contents), 1114 content::WebContents::FromJavaWebContents(ui_web_contents),
1115 reinterpret_cast<ui::WindowAndroid*>(ui_window_android), 1115 reinterpret_cast<ui::WindowAndroid*>(ui_window_android),
1116 for_web_vr)); 1116 for_web_vr));
1117 } 1117 }
1118 1118
1119 } // namespace vr_shell 1119 } // namespace vr_shell
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698