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

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

Issue 2906423002: [vr] Migrate from vr::Colorf to SkColor (Closed)
Patch Set: Created 3 years, 7 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
Index: chrome/browser/android/vr_shell/vr_shell_gl.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc
index 5369bbfbf90b14797ea21affb3ec7d2858929c37..9fffc436ee9f0a78ff6d5f6c7e52667724842335 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc
@@ -1132,9 +1132,11 @@ void VrShellGl::DrawWorldElements(const vr::Mat4f& head_pose) {
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
- const vr::Colorf& backgroundColor = scene_->GetBackgroundColor();
- glClearColor(backgroundColor.r, backgroundColor.g, backgroundColor.b,
- backgroundColor.a);
+ const SkColor backgroundColor = scene_->GetBackgroundColor();
+ glClearColor(SkColorGetR(backgroundColor) / 255.0,
+ SkColorGetG(backgroundColor) / 255.0,
+ SkColorGetB(backgroundColor) / 255.0,
+ SkColorGetA(backgroundColor) / 255.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
std::vector<const UiElement*> elements = scene_->GetWorldElements();
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc ('k') | chrome/browser/android/vr_shell/vr_shell_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698