Commit 343657ff authored by Christopher Grant's avatar Christopher Grant Committed by Commit Bot

Roll vr_gl_utils into vr_base library

Also, move UI support source out of the UI library.  Those files are
meant to supply capabilitie to the UI library, but not live in the
library itself.

BUG=
R=acondor

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ice761aa2d0f18f32bf9600e4a202421f5f705e51
Reviewed-on: https://chromium-review.googlesource.com/1179979Reviewed-by: default avatarAldo Culquicondor <acondor@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584154}
parent 280e25f8
......@@ -88,8 +88,8 @@ static_library("vr_android") {
"//base",
"//cc",
"//chrome/browser/ui:ui",
"//chrome/browser/vr:vr_base",
"//chrome/browser/vr:vr_common",
"//chrome/browser/vr:vr_gl_utils",
"//chrome/common:common",
"//chrome/common:constants",
"//components/omnibox/browser",
......
......@@ -20,21 +20,6 @@ buildflag_header("vr_build_features") {
flags = [ "USE_VR_ASSETS_COMPONENT=$use_vr_assets_component" ]
}
source_set("vr_gl_utils") {
sources = [
"vr_gl_util.cc",
"vr_gl_util.h",
]
public_deps = [
"//ui/gl/init",
]
deps = [
"//skia",
]
}
component("vr_ui") {
sources = [
"animation.cc",
......@@ -181,8 +166,6 @@ component("vr_ui") {
"ui_scene.h",
"ui_scene_creator.cc",
"ui_scene_creator.h",
"ui_support.cc",
"ui_support.h",
"vr_ui_export.h",
]
......@@ -192,7 +175,6 @@ component("vr_ui") {
deps = [
":vr_base",
":vr_gl_utils",
"//base",
"//cc/animation",
"//chrome/app:generated_resources",
......@@ -252,11 +234,9 @@ component("vr_common") {
public_deps = [
":vr_base",
"//ui/gl",
]
deps = [
":vr_gl_utils",
":vr_ui",
"//base",
"//cc/animation",
......@@ -342,11 +322,15 @@ source_set("vr_base") {
"ui_initial_state.cc",
"ui_initial_state.h",
"ui_interface.h",
"ui_support.cc",
"ui_support.h",
"ui_test_input.h",
"ui_unsupported_mode.h",
"vr_export.h",
"vr_geometry_util.cc",
"vr_geometry_util.h",
"vr_gl_util.cc",
"vr_gl_util.h",
]
defines = [
......@@ -360,6 +344,7 @@ source_set("vr_base") {
"//components/strings:components_strings_grit",
"//content/public/common",
"//ui/base",
"//ui/gl/init",
]
deps = [
......
......@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_VR_UI_SUPPORT_H_
#define CHROME_BROWSER_VR_UI_SUPPORT_H_
#include "chrome/browser/vr/vr_ui_export.h"
#include "chrome/browser/vr/vr_export.h"
#include "third_party/icu/source/common/unicode/uchar.h"
#include "third_party/icu/source/common/unicode/uscript.h"
#include "third_party/icu/source/common/unicode/utypes.h"
......@@ -19,7 +19,7 @@ namespace ui_support {
// must supply wrappers for use by the module. For libraries that require only
// one or two methods, it's more efficient to make wrappers.
VR_UI_EXPORT UScriptCode UScriptGetScript(UChar32 codepoint, UErrorCode* err);
VR_EXPORT UScriptCode UScriptGetScript(UChar32 codepoint, UErrorCode* err);
} // namespace ui_support
} // namespace vr
......
......@@ -8,6 +8,7 @@
#include <array>
#include <string>
#include "chrome/browser/vr/vr_export.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gl/gl_bindings.h"
......@@ -22,27 +23,27 @@ class Transform;
namespace vr {
std::array<float, 16> MatrixToGLArray(const gfx::Transform& matrix);
VR_EXPORT std::array<float, 16> MatrixToGLArray(const gfx::Transform& matrix);
// Compile a shader.
GLuint CompileShader(GLenum shader_type,
const GLchar* shader_source,
std::string& error);
VR_EXPORT GLuint CompileShader(GLenum shader_type,
const GLchar* shader_source,
std::string& error);
// Compile and link a program.
GLuint CreateAndLinkProgram(GLuint vertex_shader_handle,
GLuint fragment_shader_handle,
std::string& error);
VR_EXPORT GLuint CreateAndLinkProgram(GLuint vertex_shader_handle,
GLuint fragment_shader_handle,
std::string& error);
// Sets default texture parameters given a texture type.
void SetTexParameters(GLenum texture_type);
VR_EXPORT void SetTexParameters(GLenum texture_type);
// Sets color uniforms given an SkColor.
void SetColorUniform(GLuint handle, SkColor c);
VR_EXPORT void SetColorUniform(GLuint handle, SkColor c);
// Sets color uniforms (but not alpha) given an SkColor. The alpha is assumed to
// be 1.0 in this case.
void SetOpaqueColorUniform(GLuint handle, SkColor c);
VR_EXPORT void SetOpaqueColorUniform(GLuint handle, SkColor c);
} // namespace vr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment