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

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

Issue 2911943002: [vr] Add incognito coloring (Closed)
Patch Set: Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/ui_elements/textured_element.h" 5 #include "chrome/browser/android/vr_shell/ui_elements/textured_element.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "cc/paint/skia_paint_canvas.h" 8 #include "cc/paint/skia_paint_canvas.h"
9 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" 9 #include "chrome/browser/android/vr_shell/textures/ui_texture.h"
10 #include "chrome/browser/android/vr_shell/vr_shell_renderer.h" 10 #include "chrome/browser/android/vr_shell/vr_shell_renderer.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 glBindTexture(GL_TEXTURE_2D, texture_handle_); 59 glBindTexture(GL_TEXTURE_2D, texture_handle_);
60 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 60 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
61 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 61 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
62 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 62 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
63 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 63 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
64 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pixmap.width(), pixmap.height(), 0, 64 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pixmap.width(), pixmap.height(), 0,
65 GL_RGBA, GL_UNSIGNED_BYTE, pixmap.addr()); 65 GL_RGBA, GL_UNSIGNED_BYTE, pixmap.addr());
66 } 66 }
67 67
68 void TexturedElement::OnSetMode() {
69 GetTexture()->SetMode(mode());
70 }
71
68 } // namespace vr_shell 72 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698