blob: bb67923ae3c95ff134ac3c6a1a29c374c18429ff [file] [log] [blame]
# Copyright 2014 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.
import("//testing/test.gni")
import("//mojo/public/tools/bindings/mojom.gni")
config("mojo_use_gles2") {
defines = [ "MOJO_USE_GLES2_IMPL" ]
}
config("gles2_use_mojo") {
defines = [ "GLES2_USE_MOJO" ]
}
source_set("control_thunks") {
sources = [
"command_buffer_client_impl.cc",
"command_buffer_client_impl.h",
"control_thunks_impl.cc",
"control_thunks_impl.h",
"gles2_context.cc",
"gles2_context.h",
]
deps = [
"//base",
"//mojo/public/c/system",
"//gpu/command_buffer/client",
"//gpu/command_buffer/client:gles2_cmd_helper",
"//gpu/command_buffer/client:gles2_implementation",
"//gpu/command_buffer/common",
"//mojo/public/c/gpu:MGL",
"//mojo/public/c/gpu:MGL_onscreen",
"//mojo/public/c/gpu:MGL_signal_sync_point",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/system",
"//services/gles2:lib",
"//mojo/services/gpu/public/interfaces",
]
}
source_set("gles2") {
sources = [
"gles2_impl.cc",
]
defines = [
"GL_GLEXT_PROTOTYPES",
"MOJO_GLES2_IMPLEMENTATION",
]
configs += [
":gles2_use_mojo",
":mojo_use_gles2",
]
public_configs = [ ":gles2_use_mojo" ]
all_dependent_configs = [ ":mojo_use_gles2" ]
deps = [
":control_thunks",
"//gpu/command_buffer/client:gles2_interface",
"//mojo/public/c/gpu:MGL",
"//mojo/public/c/gpu:GLES2",
]
}
source_set("mgl") {
sources = [
"mgl_impl.cc",
]
configs += [ ":gles2_use_mojo" ]
deps = [
":control_thunks",
":gles2",
"//mojo/public/c/gpu:MGL",
"//mojo/public/c/gpu:MGL_onscreen",
"//mojo/public/cpp/system",
]
}
test("mgl_unittests") {
deps = [
":mgl",
"//base",
"//base/test:test_support",
"//mojo/edk/system",
"//mojo/edk/test:run_all_unittests",
"//mojo/edk/test:test_support_impl",
"//mojo/public/c/gpu:MGL",
"//mojo/public/c/test_support:test_support",
"//mojo/public/cpp/environment:standalone",
"//testing/gtest:gtest",
]
sources = [
"mgl_unittest.cc",
]
}