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

Unified Diff: chrome/browser/android/vr_shell/ui_element_renderer.h

Issue 2903363002: VR: Split off UI code into a library to ease future unit testing. (Closed)
Patch Set: More tweaks. 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/ui_element_renderer.h
diff --git a/chrome/browser/android/vr_shell/ui_element_renderer.h b/chrome/browser/android/vr_shell/ui_element_renderer.h
new file mode 100644
index 0000000000000000000000000000000000000000..b14af75c28718d8f22dcc9b8c295001c1161de89
--- /dev/null
+++ b/chrome/browser/android/vr_shell/ui_element_renderer.h
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENT_RENDERER_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENT_RENDERER_H_
+
+#include "device/vr/vr_types.h"
+#include "third_party/skia/include/core/SkColor.h"
+
+namespace vr_shell {
+
+// This is the interface offered by VrShell's GL system to UI elements.
+class UiElementRenderer {
+ public:
+ virtual ~UiElementRenderer() {}
+
+ virtual void DrawTexturedQuad(int texture_data_handle,
+ const vr::Mat4f& view_proj_matrix,
+ const gfx::RectF& copy_rect,
+ float opacity) = 0;
+
+ virtual void DrawGradientQuad(const vr::Mat4f& view_proj_matrix,
+ const SkColor edge_color,
+ const SkColor center_color,
+ float opacity) = 0;
+};
+
+} // namespace vr_shell
+
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENT_RENDERER_H_
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/ui_elements/screen_dimmer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698