OLD | NEW |
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 package org.chromium.chrome.browser.vr_shell; | 5 package org.chromium.chrome.browser.vr_shell; |
6 | 6 |
7 import static android.opengl.GLES20.GL_NEAREST; | 7 import static android.opengl.GLES20.GL_NEAREST; |
8 import static android.opengl.GLES20.GL_TEXTURE_MAG_FILTER; | 8 import static android.opengl.GLES20.GL_TEXTURE_MAG_FILTER; |
9 import static android.opengl.GLES20.GL_TEXTURE_MIN_FILTER; | 9 import static android.opengl.GLES20.GL_TEXTURE_MIN_FILTER; |
10 import static android.opengl.GLES20.glBindTexture; | 10 import static android.opengl.GLES20.glBindTexture; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Temporary values that will be changed when the UI loads and figures out h
ow what size it | 70 // Temporary values that will be changed when the UI loads and figures out h
ow what size it |
71 // needs to be. | 71 // needs to be. |
72 private static final float DEFAULT_UI_WIDTH = 1920f; | 72 private static final float DEFAULT_UI_WIDTH = 1920f; |
73 private static final float DEFAULT_UI_HEIGHT = 1080f; | 73 private static final float DEFAULT_UI_HEIGHT = 1080f; |
74 | 74 |
75 private final GLSurfaceView mGlSurfaceView; | 75 private final GLSurfaceView mGlSurfaceView; |
76 private final Activity mActivity; | 76 private final Activity mActivity; |
77 private final VirtualDisplayAndroid mContentVirtualDisplay; | 77 private final VirtualDisplayAndroid mContentVirtualDisplay; |
78 private final VirtualDisplayAndroid mUiVirtualDisplay; | 78 private final VirtualDisplayAndroid mUiVirtualDisplay; |
79 | 79 |
80 private long mNativeVrShell = 0; | 80 private long mNativeVrShell; |
81 | 81 |
82 private int mContentTextureHandle; | 82 private int mContentTextureHandle; |
83 private int mUiTextureHandle; | 83 private int mUiTextureHandle; |
84 private FrameListener mContentFrameListener; | 84 private FrameListener mContentFrameListener; |
85 private FrameListener mUiFrameListener; | 85 private FrameListener mUiFrameListener; |
86 | 86 |
87 private FrameLayout mContentCVCContainer; | 87 private FrameLayout mContentCVCContainer; |
88 private FrameLayout mUiCVCContainer; | 88 private FrameLayout mUiCVCContainer; |
89 | 89 |
90 // The tab that holds the main ContentViewCore. | 90 // The tab that holds the main ContentViewCore. |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 private native void nativeOnResumeOnUI(long nativeVrShell); | 499 private native void nativeOnResumeOnUI(long nativeVrShell); |
500 private native void nativeSurfacesChangedOnUI( | 500 private native void nativeSurfacesChangedOnUI( |
501 long nativeVrShell, Surface contentSurface, Surface uiSurface); | 501 long nativeVrShell, Surface contentSurface, Surface uiSurface); |
502 private native void nativeContentBoundsChangedOnUI(long nativeVrShell, int w
idth, int height, | 502 private native void nativeContentBoundsChangedOnUI(long nativeVrShell, int w
idth, int height, |
503 float dpr); | 503 float dpr); |
504 private native void nativeUIBoundsChangedOnUI(long nativeVrShell, int width,
int height, | 504 private native void nativeUIBoundsChangedOnUI(long nativeVrShell, int width,
int height, |
505 float dpr); | 505 float dpr); |
506 private native void nativeUpdateCompositorLayersOnUI(long nativeVrShell); | 506 private native void nativeUpdateCompositorLayersOnUI(long nativeVrShell); |
507 private native void nativeSetWebVrModeOnUI(long nativeVrShell, boolean enabl
ed); | 507 private native void nativeSetWebVrModeOnUI(long nativeVrShell, boolean enabl
ed); |
508 } | 508 } |
OLD | NEW |