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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_renderer.cc

Issue 2729523002: Re-land^2 WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: Rebase to 11e28fd6b9380b77273db51ef0b6ccc7ea341944 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | device/vr/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell_renderer.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_renderer.cc b/chrome/browser/android/vr_shell/vr_shell_renderer.cc
index 55ce951060754346029617c78f5237602d2067bf..0ce95a9f712eda808e3f8c369c9094bd352a833b 100644
--- a/chrome/browser/android/vr_shell/vr_shell_renderer.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_renderer.cc
@@ -406,11 +406,9 @@ void WebVrRenderer::Draw(int texture_handle) {
VOID_OFFSET(kTextureCoordinateDataOffset));
glEnableVertexAttribArray(tex_coord_handle_);
- // Bind texture. Ideally this should be a 1:1 pixel copy. (Or even more
- // ideally, a zero copy reuse of the texture.) For now, we're using an
- // undersized render target for WebVR, so GL_LINEAR makes it look slightly
- // less chunky. TODO(klausw): change this to GL_NEAREST once we're doing
- // a 1:1 copy since that should be more efficient.
+ // Bind texture. This is a 1:1 pixel copy since the source surface
+ // and renderbuffer destination size are resized to match, so use
+ // GL_NEAREST.
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_handle);
glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | device/vr/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698