| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.chromoting; | 5 package org.chromium.chromoting; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.graphics.PointF; | 9 import android.graphics.PointF; |
| 10 import android.opengl.GLES20; | 10 import android.opengl.GLES20; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 private int mProgramHandle; | 118 private int mProgramHandle; |
| 119 private int mDesktopVertexShaderHandle; | 119 private int mDesktopVertexShaderHandle; |
| 120 private int mDesktopFragmentShaderHandle; | 120 private int mDesktopFragmentShaderHandle; |
| 121 private int mEyePointVertexShaderHandle; | 121 private int mEyePointVertexShaderHandle; |
| 122 private int mEyePointFragmentShaderHandle; | 122 private int mEyePointFragmentShaderHandle; |
| 123 private int mEyePointProgramHandle; | 123 private int mEyePointProgramHandle; |
| 124 private int mEyePointPositionHandle; | 124 private int mEyePointPositionHandle; |
| 125 private int mEyePointCombinedMatrixHandle; | 125 private int mEyePointCombinedMatrixHandle; |
| 126 | 126 |
| 127 /** Lock to allow multithreaded access to mReloadTexture. */ | 127 /** Lock to allow multithreaded access to mReloadTexture. */ |
| 128 private Object mReloadTextureLock = new Object(); | 128 private final Object mReloadTextureLock = new Object(); |
| 129 | 129 |
| 130 // Lock for eye position related operations. | 130 // Lock for eye position related operations. |
| 131 // This protects access to mEyePositionVector as well as mDesktop{Height/Wid
th}Pixels. | 131 // This protects access to mEyePositionVector as well as mDesktop{Height/Wid
th}Pixels. |
| 132 private Object mEyePositionLock = new Object(); | 132 private final Object mEyePositionLock = new Object(); |
| 133 | 133 |
| 134 private int mDesktopHeightPixels; | 134 private int mDesktopHeightPixels; |
| 135 private int mDesktopWidthPixels; | 135 private int mDesktopWidthPixels; |
| 136 | 136 |
| 137 private FloatBuffer mDesktopCoordinates; | 137 private FloatBuffer mDesktopCoordinates; |
| 138 | 138 |
| 139 public CardboardDesktopRenderer(Context context) { | 139 public CardboardDesktopRenderer(Context context) { |
| 140 mActivityContext = context; | 140 mActivityContext = context; |
| 141 mReloadTexture = false; | 141 mReloadTexture = false; |
| 142 | 142 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 -mHalfDesktopWidth, HALF_DESKTOP_HEIGHT, 0.0f, | 482 -mHalfDesktopWidth, HALF_DESKTOP_HEIGHT, 0.0f, |
| 483 -mHalfDesktopWidth, -HALF_DESKTOP_HEIGHT, 0.0f, | 483 -mHalfDesktopWidth, -HALF_DESKTOP_HEIGHT, 0.0f, |
| 484 mHalfDesktopWidth, HALF_DESKTOP_HEIGHT, 0.0f, | 484 mHalfDesktopWidth, HALF_DESKTOP_HEIGHT, 0.0f, |
| 485 -mHalfDesktopWidth, -HALF_DESKTOP_HEIGHT, 0.0f, | 485 -mHalfDesktopWidth, -HALF_DESKTOP_HEIGHT, 0.0f, |
| 486 mHalfDesktopWidth, -HALF_DESKTOP_HEIGHT, 0.0f, | 486 mHalfDesktopWidth, -HALF_DESKTOP_HEIGHT, 0.0f, |
| 487 mHalfDesktopWidth, HALF_DESKTOP_HEIGHT, 0.0f | 487 mHalfDesktopWidth, HALF_DESKTOP_HEIGHT, 0.0f |
| 488 }); | 488 }); |
| 489 } | 489 } |
| 490 } | 490 } |
| 491 } | 491 } |
| OLD | NEW |