summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-07 14:53:32 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-07 14:53:32 +0000
commitab6ce194c68e78f474ec39cdae6cb941fa9eb237 (patch)
treec75f5aaec3d8f4e99592b3614fb9db9f85669356
parentf5da7dc925e30fd5b28877ae74f134058bb0eff7 (diff)
downloadchromium_src-ab6ce194c68e78f474ec39cdae6cb941fa9eb237.zip
chromium_src-ab6ce194c68e78f474ec39cdae6cb941fa9eb237.tar.gz
chromium_src-ab6ce194c68e78f474ec39cdae6cb941fa9eb237.tar.bz2
Add gpu targets to untrusted build, and add Graphics3D code to untrusted build.
BUG=116317 TEST=builds,manual With this change, the IPC-based PPAPI proxy builds and runs the tumbler example. Review URL: https://chromiumcodereview.appspot.com/10796038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150343 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--gpu/command_buffer/client/ref_counted.h6
-rw-r--r--gpu/command_buffer/command_buffer.gyp20
-rw-r--r--gpu/command_buffer/command_buffer.gypi30
-rw-r--r--gpu/command_buffer/command_buffer_untrusted.gyp34
-rw-r--r--gpu/command_buffer_common.gypi4
-rw-r--r--gpu/gpu.gyp297
-rw-r--r--gpu/gpu_common.gypi293
-rw-r--r--gpu/gpu_untrusted.gyp116
-rw-r--r--ppapi/native_client/native_client.gyp54
-rw-r--r--ppapi/ppapi_proxy.gypi3
-rw-r--r--ppapi/ppapi_proxy_untrusted.gyp15
-rw-r--r--ppapi/ppapi_shared.gypi3
-rw-r--r--ppapi/ppapi_shared_untrusted.gyp12
-rw-r--r--ppapi/proxy/interface_list.cc4
-rw-r--r--ppapi/proxy/ppapi_messages.h2
-rw-r--r--ppapi/proxy/resource_creation_proxy.cc36
-rw-r--r--ppapi/proxy/resource_creation_proxy.h14
-rw-r--r--ppapi/shared_impl/ppb_image_data_shared.cc12
-rw-r--r--ppapi/thunk/interfaces_ppb_public_dev.h1
-rw-r--r--ppapi/thunk/interfaces_ppb_public_stable.h3
-rw-r--r--ppapi/thunk/resource_creation_api.h12
21 files changed, 612 insertions, 359 deletions
diff --git a/gpu/command_buffer/client/ref_counted.h b/gpu/command_buffer/client/ref_counted.h
index 83346d35..e3c8f27 100644
--- a/gpu/command_buffer/client/ref_counted.h
+++ b/gpu/command_buffer/client/ref_counted.h
@@ -5,7 +5,11 @@
#ifndef GPU_COMMAND_BUFFER_CLIENT_REF_COUNTED_H_
#define GPU_COMMAND_BUFFER_CLIENT_REF_COUNTED_H_
-#if defined(__native_client__)
+// TODO(bbudge) The NaCl SRPC proxy can't depend on base, so we define our own
+// ref_counted. This causes duplicate class warnings in the NaCl IPC proxy,
+// which uses base. Remove the custom ref_counted class after NaCl has switched
+// proxies.
+#if defined(__native_client__) && !defined(NACL_PPAPI_IPC_PROXY)
#include "native_client/src/include/ref_counted.h"
namespace gpu {
using nacl::RefCountedThreadSafe;
diff --git a/gpu/command_buffer/command_buffer.gyp b/gpu/command_buffer/command_buffer.gyp
index dffac1c..7a4c10a 100644
--- a/gpu/command_buffer/command_buffer.gyp
+++ b/gpu/command_buffer/command_buffer.gyp
@@ -6,13 +6,16 @@
'variables': {
'chromium_code': 1,
},
+ 'includes': [
+ 'command_buffer.gypi',
+ ],
'targets': [
{
'target_name': 'gles2_utils',
'type': '<(component)',
- 'include_dirs': [
- '<(DEPTH)/third_party/khronos',
- ],
+ 'variables': {
+ 'gles2_utils_target': 1,
+ },
'all_dependent_settings': {
'include_dirs': [
'<(DEPTH)/third_party/khronos',
@@ -24,17 +27,6 @@
'export_dependent_settings': [
'../../base/base.gyp:base',
],
- 'defines': [
- 'GLES2_UTILS_IMPLEMENTATION',
- ],
- 'sources': [
- 'common/gles2_cmd_format.h',
- 'common/gles2_cmd_utils.cc',
- 'common/gles2_cmd_utils.h',
- 'common/gles2_utils_export.h',
- 'common/logging.cc',
- 'common/logging.h',
- ],
},
],
}
diff --git a/gpu/command_buffer/command_buffer.gypi b/gpu/command_buffer/command_buffer.gypi
new file mode 100644
index 0000000..057a7ce
--- /dev/null
+++ b/gpu/command_buffer/command_buffer.gypi
@@ -0,0 +1,30 @@
+# Copyright (c) 2012 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.
+
+{
+ 'target_defaults': {
+ 'variables': {
+ 'gles2_utils_target': 0,
+ },
+ 'target_conditions': [
+ # This part is shared between the targets defined below.
+ ['gles2_utils_target==1', {
+ 'defines': [
+ 'GLES2_UTILS_IMPLEMENTATION',
+ ],
+ 'include_dirs': [
+ '<(DEPTH)/third_party/khronos',
+ ],
+ 'sources': [
+ 'common/gles2_cmd_format.h',
+ 'common/gles2_cmd_utils.cc',
+ 'common/gles2_cmd_utils.h',
+ 'common/gles2_utils_export.h',
+ 'common/logging.cc',
+ 'common/logging.h',
+ ],
+ }],
+ ],
+ },
+}
diff --git a/gpu/command_buffer/command_buffer_untrusted.gyp b/gpu/command_buffer/command_buffer_untrusted.gyp
new file mode 100644
index 0000000..25987e7
--- /dev/null
+++ b/gpu/command_buffer/command_buffer_untrusted.gyp
@@ -0,0 +1,34 @@
+# Copyright (c) 2012 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.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../../native_client/build/untrusted.gypi',
+ 'command_buffer.gypi',
+ ],
+ 'conditions': [
+ ['disable_nacl==0 and disable_nacl_untrusted==0', {
+ 'targets': [
+ {
+ 'target_name': 'gles2_utils_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'gles2_utils_target': 1,
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libgles2_utils_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'dependencies': [
+ '../../native_client/tools.gyp:prep_toolchain',
+ '../../base/base_untrusted.gyp:base_untrusted',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/gpu/command_buffer_common.gypi b/gpu/command_buffer_common.gypi
index 4ec2001..d998321 100644
--- a/gpu/command_buffer_common.gypi
+++ b/gpu/command_buffer_common.gypi
@@ -11,10 +11,6 @@
'<(DEPTH)/third_party/khronos',
],
},
- 'dependencies': [
- '../base/base.gyp:base',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- ],
'sources': [
'command_buffer/common/bitfield_helpers.h',
'command_buffer/common/buffer.h',
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index 1b8d54d..692f8da 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -3,37 +3,274 @@
# found in the LICENSE file.
{
- 'variables': {
- 'chromium_code': 1,
- # These are defined here because we need to build this library twice. Once
- # with extra parameter checking. Once with no parameter checking to be 100%
- # OpenGL ES 2.0 compliant for the conformance tests.
- 'gles2_c_lib_source_files': [
- 'command_buffer/client/gles2_c_lib.cc',
- 'command_buffer/client/gles2_c_lib_autogen.h',
- 'command_buffer/client/gles2_c_lib_export.h',
- 'command_buffer/client/gles2_lib.h',
- 'command_buffer/client/gles2_lib.cc',
- ],
- # These are defined here because we need to build this library twice. Once
- # with without support for client side arrays and once with for pepper and
- # the OpenGL ES 2.0 compliant for the conformance tests.
- 'gles2_implementation_source_files': [
- 'command_buffer/client/gles2_impl_export.h',
- 'command_buffer/client/gles2_implementation_autogen.h',
- 'command_buffer/client/gles2_implementation.cc',
- 'command_buffer/client/gles2_implementation.h',
- 'command_buffer/client/program_info_manager.cc',
- 'command_buffer/client/program_info_manager.h',
- 'command_buffer/client/query_tracker.cc',
- 'command_buffer/client/query_tracker.h',
- 'command_buffer/client/share_group.cc',
- 'command_buffer/client/share_group.h',
- ]
- },
'includes': [
'gpu_common.gypi',
],
+ 'targets': [
+ {
+ # Library emulates GLES2 using command_buffers.
+ 'target_name': 'gles2_implementation',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../ui/gl/gl.gyp:gl',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'gles2_cmd_helper',
+ ],
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ # For GLES2/gl2.h
+ '<(DEPTH)/third_party/khronos',
+ ],
+ },
+ 'defines': [
+ 'GLES2_IMPL_IMPLEMENTATION',
+ ],
+ 'sources': [
+ '<@(gles2_implementation_source_files)',
+ ],
+ },
+ {
+ # Library emulates GLES2 using command_buffers.
+ 'target_name': 'gles2_implementation_client_side_arrays',
+ 'type': '<(component)',
+ 'defines': [
+ 'GLES2_IMPL_IMPLEMENTATION',
+ 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../ui/gl/gl.gyp:gl',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'gles2_cmd_helper',
+ ],
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ # For GLES2/gl2.h
+ '<(DEPTH)/third_party/khronos',
+ ],
+ },
+ 'sources': [
+ '<@(gles2_implementation_source_files)',
+ ],
+ },
+ {
+ # Library emulates GLES2 using command_buffers.
+ 'target_name': 'gles2_implementation_client_side_arrays_no_check',
+ 'type': '<(component)',
+ 'defines': [
+ 'GLES2_IMPL_IMPLEMENTATION',
+ 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1',
+ 'GLES2_CONFORMANCE_TESTS=1',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'gles2_cmd_helper',
+ ],
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ # For GLES2/gl2.h
+ '<(DEPTH)/third_party/khronos',
+ ],
+ },
+ 'sources': [
+ '<@(gles2_implementation_source_files)',
+ ],
+ },
+ {
+ # Stub to expose gles2_implemenation in C instead of C++.
+ # so GLES2 C programs can work with no changes.
+ 'target_name': 'gles2_c_lib',
+ 'type': '<(component)',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'command_buffer_client',
+ 'gles2_implementation',
+ ],
+ 'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
+ ],
+ 'sources': [
+ '<@(gles2_c_lib_source_files)',
+ ],
+ },
+ {
+ # Same as gles2_c_lib except with no parameter checking. Required for
+ # OpenGL ES 2.0 conformance tests.
+ 'target_name': 'gles2_c_lib_nocheck',
+ 'type': '<(component)',
+ 'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
+ 'GLES2_CONFORMANCE_TESTS=1',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'command_buffer_client',
+ 'gles2_implementation_client_side_arrays_no_check',
+ ],
+ 'sources': [
+ '<@(gles2_c_lib_source_files)',
+ ],
+ },
+ {
+ 'target_name': 'gpu_unittests',
+ 'type': '<(gtest_target_type)',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../testing/gmock.gyp:gmock',
+ '../testing/gtest.gyp:gtest',
+ '../third_party/angle/src/build_angle.gyp:translator_glsl',
+ '../ui/gl/gl.gyp:gl',
+ '../ui/ui.gyp:ui',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'command_buffer_client',
+ 'command_buffer_common',
+ 'command_buffer_service',
+ 'gpu',
+ 'gpu_unittest_utils',
+ 'gles2_implementation_client_side_arrays',
+ 'gles2_cmd_helper',
+ ],
+ 'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
+ ],
+ 'sources': [
+ '<@(gles2_c_lib_source_files)',
+ 'command_buffer/client/client_test_helper.cc',
+ 'command_buffer/client/client_test_helper.h',
+ 'command_buffer/client/cmd_buffer_helper_test.cc',
+ 'command_buffer/client/fenced_allocator_test.cc',
+ 'command_buffer/client/gles2_implementation_unittest.cc',
+ 'command_buffer/client/mapped_memory_unittest.cc',
+ 'command_buffer/client/query_tracker_unittest.cc',
+ 'command_buffer/client/program_info_manager_unittest.cc',
+ 'command_buffer/client/ring_buffer_test.cc',
+ 'command_buffer/client/transfer_buffer_unittest.cc',
+ 'command_buffer/common/bitfield_helpers_test.cc',
+ 'command_buffer/common/command_buffer_mock.cc',
+ 'command_buffer/common/command_buffer_mock.h',
+ 'command_buffer/common/command_buffer_shared_test.cc',
+ 'command_buffer/common/gles2_cmd_format_test.cc',
+ 'command_buffer/common/gles2_cmd_format_test_autogen.h',
+ 'command_buffer/common/gles2_cmd_utils_unittest.cc',
+ 'command_buffer/common/id_allocator_test.cc',
+ 'command_buffer/common/trace_event.h',
+ 'command_buffer/common/unittest_main.cc',
+ 'command_buffer/service/buffer_manager_unittest.cc',
+ 'command_buffer/service/cmd_parser_test.cc',
+ 'command_buffer/service/command_buffer_service_unittest.cc',
+ 'command_buffer/service/common_decoder_unittest.cc',
+ 'command_buffer/service/context_group_unittest.cc',
+ 'command_buffer/service/feature_info_unittest.cc',
+ 'command_buffer/service/framebuffer_manager_unittest.cc',
+ 'command_buffer/service/gles2_cmd_decoder_unittest.cc',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_1.cc',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_2.cc',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_3.cc',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_base.cc',
+ 'command_buffer/service/gles2_cmd_decoder_unittest_base.h',
+ 'command_buffer/service/gl_surface_mock.cc',
+ 'command_buffer/service/gl_surface_mock.h',
+ 'command_buffer/service/gpu_scheduler_unittest.cc',
+ 'command_buffer/service/id_manager_unittest.cc',
+ 'command_buffer/service/memory_program_cache_unittest.cc',
+ 'command_buffer/service/mocks.cc',
+ 'command_buffer/service/mocks.h',
+ 'command_buffer/service/program_manager_unittest.cc',
+ 'command_buffer/service/query_manager_unittest.cc',
+ 'command_buffer/service/renderbuffer_manager_unittest.cc',
+ 'command_buffer/service/program_cache_lru_helper_unittest.cc',
+ 'command_buffer/service/program_cache_unittest.cc',
+ 'command_buffer/service/shader_manager_unittest.cc',
+ 'command_buffer/service/shader_translator_unittest.cc',
+ 'command_buffer/service/stream_texture_mock.cc',
+ 'command_buffer/service/stream_texture_mock.h',
+ 'command_buffer/service/stream_texture_manager_mock.cc',
+ 'command_buffer/service/stream_texture_manager_mock.h',
+ 'command_buffer/service/test_helper.cc',
+ 'command_buffer/service/test_helper.h',
+ 'command_buffer/service/texture_manager_unittest.cc',
+ 'command_buffer/service/transfer_buffer_manager_unittest.cc',
+ 'command_buffer/service/vertex_attrib_manager_unittest.cc',
+ ],
+ 'conditions': [
+ ['OS == "android" and gtest_target_type == "shared_library"', {
+ 'dependencies': [
+ '../testing/android/native_test.gyp:native_test_native_code',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'gl_tests',
+ 'type': 'executable',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../testing/gmock.gyp:gmock',
+ '../testing/gtest.gyp:gtest',
+ '../third_party/angle/src/build_angle.gyp:translator_glsl',
+ '../ui/ui.gyp:ui',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ 'command_buffer_client',
+ 'command_buffer_common',
+ 'command_buffer_service',
+ 'gpu',
+ 'gpu_unittest_utils',
+ 'gles2_implementation_client_side_arrays',
+ 'gles2_cmd_helper',
+ #'gl_unittests',
+ ],
+ 'defines': [
+ 'GLES2_C_LIB_IMPLEMENTATION',
+ 'GL_GLEXT_PROTOTYPES',
+ ],
+ 'sources': [
+ '<@(gles2_c_lib_source_files)',
+ 'command_buffer/tests/gl_bind_uniform_location_unittest.cc',
+ 'command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc',
+ 'command_buffer/tests/gl_depth_texture_unittest.cc',
+ 'command_buffer/tests/gl_get_error_query_unittests.cc',
+ 'command_buffer/tests/gl_manager.cc',
+ 'command_buffer/tests/gl_manager.h',
+ 'command_buffer/tests/gl_pointcoord_unittest.cc',
+ 'command_buffer/tests/gl_tests_main.cc',
+ 'command_buffer/tests/gl_test_utils.cc',
+ 'command_buffer/tests/gl_test_utils.h',
+ 'command_buffer/tests/gl_texture_mailbox_unittests.cc',
+ 'command_buffer/tests/gl_unittests.cc',
+ 'command_buffer/tests/occlusion_query_unittests.cc',
+ ],
+ },
+ {
+ 'target_name': 'gpu_unittest_utils',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../testing/gmock.gyp:gmock',
+ '../testing/gtest.gyp:gtest',
+ '../ui/gl/gl.gyp:gl',
+ ],
+ 'include_dirs': [
+ '..',
+ '<(DEPTH)/third_party/khronos',
+ ],
+ 'sources': [
+ 'command_buffer/common/gl_mock.h',
+ 'command_buffer/common/gl_mock.cc',
+ 'command_buffer/service/gles2_cmd_decoder_mock.cc',
+ 'command_buffer/service/gles2_cmd_decoder_mock.cc',
+ ],
+ },
+ ],
'conditions': [
['component=="static_library"', {
'targets': [
@@ -57,6 +294,10 @@
'includes': [
'command_buffer_common.gypi',
],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ 'command_buffer/command_buffer.gyp:gles2_utils',
+ ],
'export_dependent_settings': [
'../base/base.gyp:base',
],
diff --git a/gpu/gpu_common.gypi b/gpu/gpu_common.gypi
index 1cd742c..699863f 100644
--- a/gpu/gpu_common.gypi
+++ b/gpu/gpu_common.gypi
@@ -3,271 +3,34 @@
# found in the LICENSE file.
{
- 'targets': [
- {
- # Library emulates GLES2 using command_buffers.
- 'target_name': 'gles2_implementation',
- 'type': '<(component)',
- 'dependencies': [
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- 'gles2_cmd_helper',
- ],
- 'all_dependent_settings': {
- 'include_dirs': [
- # For GLES2/gl2.h
- '<(DEPTH)/third_party/khronos',
- ],
- },
- 'defines': [
- 'GLES2_IMPL_IMPLEMENTATION',
- ],
- 'sources': [
- '<@(gles2_implementation_source_files)',
- ],
- },
- {
- # Library emulates GLES2 using command_buffers.
- 'target_name': 'gles2_implementation_client_side_arrays',
- 'type': '<(component)',
- 'defines': [
- 'GLES2_IMPL_IMPLEMENTATION',
- 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1',
- ],
- 'dependencies': [
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- 'gles2_cmd_helper',
- ],
- 'all_dependent_settings': {
- 'include_dirs': [
- # For GLES2/gl2.h
- '<(DEPTH)/third_party/khronos',
- ],
- },
- 'sources': [
- '<@(gles2_implementation_source_files)',
- ],
- },
- {
- # Library emulates GLES2 using command_buffers.
- 'target_name': 'gles2_implementation_client_side_arrays_no_check',
- 'type': '<(component)',
- 'defines': [
- 'GLES2_IMPL_IMPLEMENTATION',
- 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1',
- 'GLES2_CONFORMANCE_TESTS=1',
- ],
- 'dependencies': [
- '../base/base.gyp:base',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- 'gles2_cmd_helper',
- ],
- 'all_dependent_settings': {
- 'include_dirs': [
- # For GLES2/gl2.h
- '<(DEPTH)/third_party/khronos',
- ],
- },
- 'sources': [
- '<@(gles2_implementation_source_files)',
- ],
- },
- {
- # Stub to expose gles2_implemenation in C instead of C++.
- # so GLES2 C programs can work with no changes.
- 'target_name': 'gles2_c_lib',
- 'type': '<(component)',
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- 'command_buffer_client',
- 'gles2_implementation',
- ],
- 'defines': [
- 'GLES2_C_LIB_IMPLEMENTATION',
- ],
- 'sources': [
- '<@(gles2_c_lib_source_files)',
- ],
- },
- {
- # Same as gles2_c_lib except with no parameter checking. Required for
- # OpenGL ES 2.0 conformance tests.
- 'target_name': 'gles2_c_lib_nocheck',
- 'type': '<(component)',
- 'defines': [
- 'GLES2_C_LIB_IMPLEMENTATION',
- 'GLES2_CONFORMANCE_TESTS=1',
- ],
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- 'command_buffer_client',
- 'gles2_implementation_client_side_arrays_no_check',
- ],
- 'sources': [
- '<@(gles2_c_lib_source_files)',
- ],
- },
- {
- 'target_name': 'gpu_unittests',
- 'type': '<(gtest_target_type)',
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- '../third_party/angle/src/build_angle.gyp:translator_glsl',
- '../ui/gl/gl.gyp:gl',
- '../ui/ui.gyp:ui',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- 'command_buffer_client',
- 'command_buffer_common',
- 'command_buffer_service',
- 'gpu',
- 'gpu_unittest_utils',
- 'gles2_implementation_client_side_arrays',
- 'gles2_cmd_helper',
- ],
- 'defines': [
- 'GLES2_C_LIB_IMPLEMENTATION',
- ],
- 'sources': [
- '<@(gles2_c_lib_source_files)',
- 'command_buffer/client/client_test_helper.cc',
- 'command_buffer/client/client_test_helper.h',
- 'command_buffer/client/cmd_buffer_helper_test.cc',
- 'command_buffer/client/fenced_allocator_test.cc',
- 'command_buffer/client/gles2_implementation_unittest.cc',
- 'command_buffer/client/mapped_memory_unittest.cc',
- 'command_buffer/client/query_tracker_unittest.cc',
- 'command_buffer/client/program_info_manager_unittest.cc',
- 'command_buffer/client/ring_buffer_test.cc',
- 'command_buffer/client/transfer_buffer_unittest.cc',
- 'command_buffer/common/bitfield_helpers_test.cc',
- 'command_buffer/common/command_buffer_mock.cc',
- 'command_buffer/common/command_buffer_mock.h',
- 'command_buffer/common/command_buffer_shared_test.cc',
- 'command_buffer/common/gles2_cmd_format_test.cc',
- 'command_buffer/common/gles2_cmd_format_test_autogen.h',
- 'command_buffer/common/gles2_cmd_utils_unittest.cc',
- 'command_buffer/common/id_allocator_test.cc',
- 'command_buffer/common/trace_event.h',
- 'command_buffer/common/unittest_main.cc',
- 'command_buffer/service/buffer_manager_unittest.cc',
- 'command_buffer/service/cmd_parser_test.cc',
- 'command_buffer/service/command_buffer_service_unittest.cc',
- 'command_buffer/service/common_decoder_unittest.cc',
- 'command_buffer/service/context_group_unittest.cc',
- 'command_buffer/service/feature_info_unittest.cc',
- 'command_buffer/service/framebuffer_manager_unittest.cc',
- 'command_buffer/service/gles2_cmd_decoder_unittest.cc',
- 'command_buffer/service/gles2_cmd_decoder_unittest_1.cc',
- 'command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h',
- 'command_buffer/service/gles2_cmd_decoder_unittest_2.cc',
- 'command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h',
- 'command_buffer/service/gles2_cmd_decoder_unittest_3.cc',
- 'command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h',
- 'command_buffer/service/gles2_cmd_decoder_unittest_base.cc',
- 'command_buffer/service/gles2_cmd_decoder_unittest_base.h',
- 'command_buffer/service/gl_surface_mock.cc',
- 'command_buffer/service/gl_surface_mock.h',
- 'command_buffer/service/gpu_scheduler_unittest.cc',
- 'command_buffer/service/id_manager_unittest.cc',
- 'command_buffer/service/memory_program_cache_unittest.cc',
- 'command_buffer/service/mocks.cc',
- 'command_buffer/service/mocks.h',
- 'command_buffer/service/program_manager_unittest.cc',
- 'command_buffer/service/query_manager_unittest.cc',
- 'command_buffer/service/renderbuffer_manager_unittest.cc',
- 'command_buffer/service/program_cache_lru_helper_unittest.cc',
- 'command_buffer/service/program_cache_unittest.cc',
- 'command_buffer/service/shader_manager_unittest.cc',
- 'command_buffer/service/shader_translator_unittest.cc',
- 'command_buffer/service/stream_texture_mock.cc',
- 'command_buffer/service/stream_texture_mock.h',
- 'command_buffer/service/stream_texture_manager_mock.cc',
- 'command_buffer/service/stream_texture_manager_mock.h',
- 'command_buffer/service/test_helper.cc',
- 'command_buffer/service/test_helper.h',
- 'command_buffer/service/texture_manager_unittest.cc',
- 'command_buffer/service/transfer_buffer_manager_unittest.cc',
- 'command_buffer/service/vertex_attrib_manager_unittest.cc',
- ],
- 'conditions': [
- ['OS == "android" and gtest_target_type == "shared_library"', {
- 'dependencies': [
- '../testing/android/native_test.gyp:native_test_native_code',
- ],
- }],
- ],
- },
- {
- 'target_name': 'gl_tests',
- 'type': 'executable',
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- '../third_party/angle/src/build_angle.gyp:translator_glsl',
- '../ui/ui.gyp:ui',
- 'command_buffer/command_buffer.gyp:gles2_utils',
- 'command_buffer_client',
- 'command_buffer_common',
- 'command_buffer_service',
- 'gpu',
- 'gpu_unittest_utils',
- 'gles2_implementation_client_side_arrays',
- 'gles2_cmd_helper',
- #'gl_unittests',
- ],
- 'defines': [
- 'GLES2_C_LIB_IMPLEMENTATION',
- 'GL_GLEXT_PROTOTYPES',
- ],
- 'sources': [
- '<@(gles2_c_lib_source_files)',
- 'command_buffer/tests/gl_bind_uniform_location_unittest.cc',
- 'command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc',
- 'command_buffer/tests/gl_depth_texture_unittest.cc',
- 'command_buffer/tests/gl_get_error_query_unittests.cc',
- 'command_buffer/tests/gl_manager.cc',
- 'command_buffer/tests/gl_manager.h',
- 'command_buffer/tests/gl_pointcoord_unittest.cc',
- 'command_buffer/tests/gl_tests_main.cc',
- 'command_buffer/tests/gl_test_utils.cc',
- 'command_buffer/tests/gl_test_utils.h',
- 'command_buffer/tests/gl_texture_mailbox_unittests.cc',
- 'command_buffer/tests/gl_unittests.cc',
- 'command_buffer/tests/occlusion_query_unittests.cc',
- ],
- },
- {
- 'target_name': 'gpu_unittest_utils',
- 'type': 'static_library',
- 'dependencies': [
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- '../ui/gl/gl.gyp:gl',
- ],
- 'include_dirs': [
- '..',
- '<(DEPTH)/third_party/khronos',
- ],
- 'sources': [
- 'command_buffer/common/gl_mock.h',
- 'command_buffer/common/gl_mock.cc',
- 'command_buffer/service/gles2_cmd_decoder_mock.cc',
- 'command_buffer/service/gles2_cmd_decoder_mock.cc',
- ],
- },
- ],
+ 'variables': {
+ 'chromium_code': 1,
+ # These are defined here because we need to build this library twice. Once
+ # with extra parameter checking. Once with no parameter checking to be 100%
+ # OpenGL ES 2.0 compliant for the conformance tests.
+ 'gles2_c_lib_source_files': [
+ 'command_buffer/client/gles2_c_lib.cc',
+ 'command_buffer/client/gles2_c_lib_autogen.h',
+ 'command_buffer/client/gles2_c_lib_export.h',
+ 'command_buffer/client/gles2_lib.h',
+ 'command_buffer/client/gles2_lib.cc',
+ ],
+ # These are defined here because we need to build this library twice. Once
+ # with without support for client side arrays and once with for pepper and
+ # the OpenGL ES 2.0 compliant for the conformance tests.
+ 'gles2_implementation_source_files': [
+ 'command_buffer/client/gles2_impl_export.h',
+ 'command_buffer/client/gles2_implementation_autogen.h',
+ 'command_buffer/client/gles2_implementation.cc',
+ 'command_buffer/client/gles2_implementation.h',
+ 'command_buffer/client/program_info_manager.cc',
+ 'command_buffer/client/program_info_manager.h',
+ 'command_buffer/client/query_tracker.cc',
+ 'command_buffer/client/query_tracker.h',
+ 'command_buffer/client/share_group.cc',
+ 'command_buffer/client/share_group.h',
+ ]
+ },
'conditions': [
# Special target to wrap a gtest_target_type==shared_library
# gpu_unittests into an android apk for execution.
diff --git a/gpu/gpu_untrusted.gyp b/gpu/gpu_untrusted.gyp
new file mode 100644
index 0000000..33abfcd
--- /dev/null
+++ b/gpu/gpu_untrusted.gyp
@@ -0,0 +1,116 @@
+# Copyright (c) 2012 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.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../native_client/build/untrusted.gypi',
+ 'gpu_common.gypi',
+ ],
+ 'conditions': [
+ ['disable_nacl==0 and disable_nacl_untrusted==0', {
+ 'targets': [
+ {
+ 'target_name': 'gles2_implementation_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libgles2_implementation_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'defines': [
+ 'GLES2_IMPL_IMPLEMENTATION',
+ ],
+ 'include_dirs': [
+ '../third_party/khronos',
+ ],
+ 'sources': [
+ '<@(gles2_implementation_source_files)',
+ ],
+ 'dependencies': [
+ '../native_client/tools.gyp:prep_toolchain',
+ '../base/base_untrusted.gyp:base_untrusted',
+ 'command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted',
+ 'gles2_cmd_helper_untrusted',
+ ],
+ },
+ {
+ 'target_name': 'command_buffer_common_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libcommand_buffer_common_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'includes': [
+ 'command_buffer_common.gypi',
+ ],
+ 'dependencies': [
+ '../native_client/tools.gyp:prep_toolchain',
+ '../base/base_untrusted.gyp:base_untrusted',
+ 'command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted',
+ ],
+ },
+ {
+ 'target_name': 'gles2_cmd_helper_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libgles2_cmd_helper_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'includes': [
+ 'gles2_cmd_helper.gypi',
+ ],
+ 'dependencies': [
+ '../native_client/tools.gyp:prep_toolchain',
+ '../base/base_untrusted.gyp:base_untrusted',
+ 'command_buffer_client_untrusted',
+ ],
+ },
+ {
+ 'target_name': 'command_buffer_client_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libcommand_buffer_client_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'includes': [
+ 'command_buffer_client.gypi',
+ ],
+ 'dependencies': [
+ '../native_client/tools.gyp:prep_toolchain',
+ '../base/base_untrusted.gyp:base_untrusted',
+ 'command_buffer_common_untrusted',
+ ],
+ },
+ {
+ 'target_name': 'gpu_ipc_untrusted',
+ 'type': 'none',
+ 'variables': {
+ 'nacl_untrusted_build': 1,
+ 'nlib_target': 'libgpu_ipc_untrusted.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ },
+ 'includes': [
+ 'gpu_ipc.gypi',
+ ],
+ 'dependencies': [
+ '../native_client/tools.gyp:prep_toolchain',
+ '../base/base_untrusted.gyp:base_untrusted',
+ 'command_buffer_common_untrusted',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/ppapi/native_client/native_client.gyp b/ppapi/native_client/native_client.gyp
index c68bf0d..36f2564 100644
--- a/ppapi/native_client/native_client.gyp
+++ b/ppapi/native_client/native_client.gyp
@@ -208,6 +208,12 @@
'-lirt_browser',
'-lppapi_proxy_untrusted',
'-lppapi_shared_untrusted',
+ '-lgles2_implementation_untrusted',
+ '-lgles2_cmd_helper_untrusted',
+ '-lgles2_utils_untrusted',
+ '-lcommand_buffer_client_untrusted',
+ '-lcommand_buffer_common_untrusted',
+ '-lgpu_ipc_untrusted',
'-lipc_untrusted',
'-lbase_untrusted',
'-lsrpc',
@@ -251,6 +257,12 @@
'extra_deps64': [
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_proxy_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgles2_implementation_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libcommand_buffer_client_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libcommand_buffer_common_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgpu_ipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgles2_cmd_helper_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgles2_utils_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libipc_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libbase_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libirt_browser.a',
@@ -262,6 +274,12 @@
'extra_deps32': [
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_proxy_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgles2_implementation_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libcommand_buffer_client_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libcommand_buffer_common_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgpu_ipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgles2_cmd_helper_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgles2_utils_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libipc_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libbase_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libirt_browser.a',
@@ -273,6 +291,12 @@
'extra_deps_newlib64': [
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_proxy_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgles2_implementation_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libcommand_buffer_client_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libcommand_buffer_common_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgpu_ipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgles2_cmd_helper_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libgles2_utils_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libipc_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libbase_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libirt_browser.a',
@@ -284,6 +308,12 @@
'extra_deps_newlib32': [
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_proxy_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgles2_implementation_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libcommand_buffer_client_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libcommand_buffer_common_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgpu_ipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgles2_cmd_helper_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libgles2_utils_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libipc_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libbase_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libirt_browser.a',
@@ -295,6 +325,12 @@
'extra_deps_glibc64': [
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi_proxy_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libgles2_implementation_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libcommand_buffer_client_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libcommand_buffer_common_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libgpu_ipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libgles2_cmd_helper_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libgles2_utils_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libipc_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libbase_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libirt_browser.a',
@@ -306,6 +342,12 @@
'extra_deps_glibc32': [
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_proxy_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libgles2_implementation_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libcommand_buffer_client_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libcommand_buffer_common_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libgpu_ipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libgles2_cmd_helper_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libgles2_utils_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libipc_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libbase_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libirt_browser.a',
@@ -317,6 +359,12 @@
'extra_deps_arm': [
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_proxy_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_shared_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libgles2_implementation_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libcommand_buffer_client_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libcommand_buffer_common_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libgpu_ipc_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libgles2_cmd_helper_untrusted.a',
+ '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libgles2_utils_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libipc_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libbase_untrusted.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libirt_browser.a',
@@ -329,6 +377,12 @@
'dependencies': [
'../ppapi_proxy_untrusted.gyp:ppapi_proxy_untrusted',
'../ppapi_shared_untrusted.gyp:ppapi_shared_untrusted',
+ '../../gpu/command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted',
+ '../../gpu/gpu_untrusted.gyp:command_buffer_client_untrusted',
+ '../../gpu/gpu_untrusted.gyp:command_buffer_common_untrusted',
+ '../../gpu/gpu_untrusted.gyp:gles2_implementation_untrusted',
+ '../../gpu/gpu_untrusted.gyp:gles2_cmd_helper_untrusted',
+ '../../gpu/gpu_untrusted.gyp:gpu_ipc_untrusted',
'../../ipc/ipc_untrusted.gyp:ipc_untrusted',
'../../base/base_untrusted.gyp:base_untrusted',
'../../native_client/src/untrusted/irt/irt.gyp:irt_browser_lib',
diff --git a/ppapi/ppapi_proxy.gypi b/ppapi/ppapi_proxy.gypi
index d6ed428..41e1b1e 100644
--- a/ppapi/ppapi_proxy.gypi
+++ b/ppapi/ppapi_proxy.gypi
@@ -172,7 +172,6 @@
['>(nacl_untrusted_build)==1', {
'sources!': [
'proxy/broker_dispatcher.cc',
- 'proxy/ppapi_command_buffer_proxy.cc',
'proxy/ppb_audio_input_proxy.cc',
'proxy/ppb_broker_proxy.cc',
'proxy/ppb_buffer_proxy.cc',
@@ -181,7 +180,6 @@
'proxy/ppb_flash_proxy.cc',
'proxy/ppb_flash_menu_proxy.cc',
'proxy/ppb_flash_message_loop_proxy.cc',
- 'proxy/ppb_graphics_3d_proxy.cc',
'proxy/ppb_host_resolver_private_proxy.cc',
'proxy/ppb_network_monitor_private_proxy.cc',
'proxy/ppb_pdf_proxy.cc',
@@ -193,7 +191,6 @@
'proxy/ppb_video_capture_proxy.cc',
'proxy/ppb_video_decoder_proxy.cc',
'proxy/ppb_x509_certificate_private_proxy.cc',
- 'proxy/ppp_graphics_3d_proxy.cc',
'proxy/ppp_instance_private_proxy.cc',
'proxy/ppp_video_decoder_proxy.cc',
'proxy/serialized_flash_menu.cc',
diff --git a/ppapi/ppapi_proxy_untrusted.gyp b/ppapi/ppapi_proxy_untrusted.gyp
index d1f6910..baaa3cf 100644
--- a/ppapi/ppapi_proxy_untrusted.gyp
+++ b/ppapi/ppapi_proxy_untrusted.gyp
@@ -23,9 +23,22 @@
'build_glibc': 0,
'build_newlib': 1,
},
+ 'defines': [
+ 'NACL_PPAPI_IPC_PROXY',
+ ],
+ 'include_dirs': [
+ '..',
+ '../third_party/khronos',
+ ],
'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ '../native_client/tools.gyp:prep_toolchain',
'../base/base_untrusted.gyp:base_untrusted',
+ '../gpu/command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted',
+ '../gpu/gpu_untrusted.gyp:command_buffer_client_untrusted',
+ '../gpu/gpu_untrusted.gyp:command_buffer_common_untrusted',
+ '../gpu/gpu_untrusted.gyp:gles2_implementation_untrusted',
+ '../gpu/gpu_untrusted.gyp:gles2_cmd_helper_untrusted',
+ '../gpu/gpu_untrusted.gyp:gpu_ipc_untrusted',
'../ipc/ipc_untrusted.gyp:ipc_untrusted',
'../ppapi/ppapi_shared_untrusted.gyp:ppapi_shared_untrusted',
],
diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi
index 27dbd09..80979ce 100644
--- a/ppapi/ppapi_shared.gypi
+++ b/ppapi/ppapi_shared.gypi
@@ -245,8 +245,6 @@
['>(nacl_untrusted_build)==1', {
'sources!': [
'shared_impl/ppb_audio_input_shared.cc',
- 'shared_impl/ppb_graphics_3d_shared.cc',
- 'shared_impl/ppb_opengles2_shared.cc',
'shared_impl/ppb_url_util_shared.cc',
'shared_impl/ppb_video_decoder_shared.cc',
'shared_impl/ppb_video_capture_shared.cc',
@@ -279,7 +277,6 @@
'thunk/ppb_flash_thunk.cc',
'thunk/ppb_flash_message_loop_thunk.cc',
'thunk/ppb_gles_chromium_texture_mapping_thunk.cc',
- 'thunk/ppb_graphics_3d_thunk.cc',
'thunk/ppb_graphics_3d_trusted_thunk.cc',
'thunk/ppb_host_resolver_private_thunk.cc',
'thunk/ppb_image_data_trusted_thunk.cc',
diff --git a/ppapi/ppapi_shared_untrusted.gyp b/ppapi/ppapi_shared_untrusted.gyp
index dba33ad..e0a08b4 100644
--- a/ppapi/ppapi_shared_untrusted.gyp
+++ b/ppapi/ppapi_shared_untrusted.gyp
@@ -23,13 +23,19 @@
'build_glibc': 0,
'build_newlib': 1,
},
+ 'defines': [
+ 'NACL_PPAPI_IPC_PROXY',
+ ],
'include_dirs': [
- '../third_party/skia/include/config',
+ '..',
+ '../third_party/khronos',
],
'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ '../native_client/tools.gyp:prep_toolchain',
'../base/base_untrusted.gyp:base_untrusted',
- '../ipc/ipc_untrusted.gyp:ipc_untrusted',
+ '../gpu/command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted',
+ '../gpu/gpu_untrusted.gyp:command_buffer_client_untrusted',
+ '../gpu/gpu_untrusted.gyp:gles2_implementation_untrusted',
],
},
],
diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc
index 292e260..fbd59c3 100644
--- a/ppapi/proxy/interface_list.cc
+++ b/ppapi/proxy/interface_list.cc
@@ -194,7 +194,6 @@ InterfaceList::InterfaceList() {
PPB_Core_Proxy::GetPPB_Core_Interface());
AddPPB(PPB_MESSAGELOOP_DEV_INTERFACE_0_1, API_ID_NONE,
PPB_MessageLoop_Proxy::GetInterface());
-#if !defined(OS_NACL)
AddPPB(PPB_OPENGLES2_INTERFACE_1_0, API_ID_NONE,
PPB_OpenGLES2_Shared::GetInterface());
AddPPB(PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0, API_ID_NONE,
@@ -211,6 +210,7 @@ InterfaceList::InterfaceList() {
PPB_OpenGLES2_Shared::GetChromiumMapSubInterface());
AddPPB(PPB_OPENGLES2_QUERY_INTERFACE_1_0, API_ID_NONE,
PPB_OpenGLES2_Shared::GetQueryInterface());
+#if !defined(OS_NACL)
AddPPB(PPB_FLASH_PRINT_INTERFACE_1_0, API_ID_PPB_FLASH,
PPB_Flash_Proxy::GetFlashPrintInterface());
#endif
@@ -250,8 +250,8 @@ InterfaceList::InterfaceList() {
AddPPP(PPP_InputEvent_Proxy::GetInfo());
AddPPP(PPP_Messaging_Proxy::GetInfo());
AddPPP(PPP_MouseLock_Proxy::GetInfo());
-#if !defined(OS_NACL)
AddPPP(PPP_Graphics3D_Proxy::GetInfo());
+#if !defined(OS_NACL)
AddPPP(PPP_Instance_Private_Proxy::GetInfo());
AddPPP(PPP_VideoCapture_Proxy::GetInfo());
AddPPP(PPP_VideoDecoder_Proxy::GetInfo());
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index 20a33f3..a72dfd8 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -873,7 +873,6 @@ IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics2D_Dev_SetScale,
ppapi::HostResource /* graphics_2d */,
float /* scale */)
-#if !defined(OS_NACL)
// PPB_Graphics3D.
IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBGraphics3D_Create,
PP_Instance /* instance */,
@@ -912,7 +911,6 @@ IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBGraphics3D_GetTransferBuffer,
uint32 /* size */)
IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
ppapi::HostResource /* graphics_3d */)
-#endif // !defined(OS_NACL)
// PPB_ImageData.
IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_Create,
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index 7061dc1..25a02fd 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -207,6 +207,25 @@ PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
is_always_opaque);
}
+PP_Resource ResourceCreationProxy::CreateGraphics3D(
+ PP_Instance instance,
+ PP_Resource share_context,
+ const int32_t* attrib_list) {
+ printf("ResourceCreationProxy::CreateGraphics3D\n");
+ return PPB_Graphics3D_Proxy::CreateProxyResource(
+ instance, share_context, attrib_list);
+}
+
+PP_Resource ResourceCreationProxy::CreateGraphics3DRaw(
+ PP_Instance instance,
+ PP_Resource share_context,
+ const int32_t* attrib_list) {
+ printf("ResourceCreationProxy::CreateGraphics3DRaw\n");
+ // Not proxied. The raw creation function is used only in the implementation
+ // of the proxy on the host side.
+ return 0;
+}
+
#if !defined(OS_NACL)
PP_Resource ResourceCreationProxy::CreateAudioInput0_1(
PP_Instance instance,
@@ -284,23 +303,6 @@ PP_Resource ResourceCreationProxy::CreateNetworkMonitor(
instance, callback, user_data);
}
-PP_Resource ResourceCreationProxy::CreateGraphics3D(
- PP_Instance instance,
- PP_Resource share_context,
- const int32_t* attrib_list) {
- return PPB_Graphics3D_Proxy::CreateProxyResource(
- instance, share_context, attrib_list);
-}
-
-PP_Resource ResourceCreationProxy::CreateGraphics3DRaw(
- PP_Instance instance,
- PP_Resource share_context,
- const int32_t* attrib_list) {
- // Not proxied. The raw creation function is used only in the implementation
- // of the proxy on the host side.
- return 0;
-}
-
PP_Resource ResourceCreationProxy::CreateScrollbar(PP_Instance instance,
PP_Bool vertical) {
NOTIMPLEMENTED(); // Not proxied yet.
diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h
index 5bfb560d..b0d80d3 100644
--- a/ppapi/proxy/resource_creation_proxy.h
+++ b/ppapi/proxy/resource_creation_proxy.h
@@ -105,6 +105,13 @@ class ResourceCreationProxy : public InterfaceProxy,
virtual PP_Resource CreateGraphics2D(PP_Instance pp_instance,
const PP_Size& size,
PP_Bool is_always_opaque) OVERRIDE;
+ virtual PP_Resource CreateGraphics3D(PP_Instance instance,
+ PP_Resource share_context,
+ const int32_t* attrib_list) OVERRIDE;
+ virtual PP_Resource CreateGraphics3DRaw(
+ PP_Instance instance,
+ PP_Resource share_context,
+ const int32_t* attrib_list) OVERRIDE;
#if !defined(OS_NACL)
virtual PP_Resource CreateAudioInput0_1(
PP_Instance instance,
@@ -127,13 +134,6 @@ class ResourceCreationProxy : public InterfaceProxy,
virtual PP_Resource CreateFlashMenu(PP_Instance instance,
const PP_Flash_Menu* menu_data) OVERRIDE;
virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) OVERRIDE;
- virtual PP_Resource CreateGraphics3D(PP_Instance instance,
- PP_Resource share_context,
- const int32_t* attrib_list) OVERRIDE;
- virtual PP_Resource CreateGraphics3DRaw(
- PP_Instance instance,
- PP_Resource share_context,
- const int32_t* attrib_list) OVERRIDE;
virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) OVERRIDE;
virtual PP_Resource CreateNetworkMonitor(
PP_Instance instance,
diff --git a/ppapi/shared_impl/ppb_image_data_shared.cc b/ppapi/shared_impl/ppb_image_data_shared.cc
index b0935e4..2a253e0 100644
--- a/ppapi/shared_impl/ppb_image_data_shared.cc
+++ b/ppapi/shared_impl/ppb_image_data_shared.cc
@@ -1,21 +1,31 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
+#include "build/build_config.h"
#include "ppapi/shared_impl/ppb_image_data_shared.h"
+#if !defined(OS_NACL)
#include "third_party/skia/include/core/SkTypes.h"
+#endif
namespace ppapi {
// static
PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
+#if !defined(OS_NACL)
if (SK_B32_SHIFT == 0)
return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
else if (SK_R32_SHIFT == 0)
return PP_IMAGEDATAFORMAT_RGBA_PREMUL;
else
return PP_IMAGEDATAFORMAT_BGRA_PREMUL; // Default to something on failure.
+#else
+ // In NaCl, just default to something. If we're wrong, it will be converted
+ // later.
+ // TODO(dmichael): Really proxy this.
+ return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
+#endif
}
// static
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h
index 418326b..373735c 100644
--- a/ppapi/thunk/interfaces_ppb_public_dev.h
+++ b/ppapi/thunk/interfaces_ppb_public_dev.h
@@ -10,7 +10,6 @@
PROXIED_API(PPB_AudioInput)
PROXIED_API(PPB_Buffer)
UNPROXIED_API(PPB_DirectoryReader)
-PROXIED_API(PPB_Graphics3D)
UNPROXIED_API(PPB_LayerCompositor)
UNPROXIED_API(PPB_Scrollbar)
PROXIED_API(PPB_VideoCapture)
diff --git a/ppapi/thunk/interfaces_ppb_public_stable.h b/ppapi/thunk/interfaces_ppb_public_stable.h
index 11b168a..81ce890 100644
--- a/ppapi/thunk/interfaces_ppb_public_stable.h
+++ b/ppapi/thunk/interfaces_ppb_public_stable.h
@@ -23,6 +23,7 @@ PROXIED_API(PPB_FileIO)
PROXIED_API(PPB_FileRef)
PROXIED_API(PPB_FileSystem)
PROXIED_API(PPB_Graphics2D)
+PROXIED_API(PPB_Graphics3D)
PROXIED_API(PPB_ImageData)
PROXIED_API(PPB_Instance)
PROXIED_API(PPB_URLLoader)
@@ -53,6 +54,7 @@ PROXIED_IFACE(PPB_FileIO, PPB_FILEIO_INTERFACE_1_0, PPB_FileIO_1_0)
PROXIED_IFACE(PPB_FileRef, PPB_FILEREF_INTERFACE_1_0, PPB_FileRef_1_0)
PROXIED_IFACE(PPB_FileSystem, PPB_FILESYSTEM_INTERFACE_1_0, PPB_FileSystem_1_0)
PROXIED_IFACE(PPB_Graphics2D, PPB_GRAPHICS_2D_INTERFACE_1_0, PPB_Graphics2D_1_0)
+PROXIED_IFACE(PPB_Graphics3D, PPB_GRAPHICS_3D_INTERFACE_1_0, PPB_Graphics3D_1_0)
PROXIED_IFACE(PPB_ImageData, PPB_IMAGEDATA_INTERFACE_1_0, PPB_ImageData_1_0)
PROXIED_IFACE(PPB_Instance, PPB_GAMEPAD_INTERFACE_1_0, PPB_Gamepad_1_0)
PROXIED_IFACE(PPB_Instance, PPB_INSTANCE_INTERFACE_1_0, PPB_Instance_1_0)
@@ -82,7 +84,6 @@ PROXIED_IFACE(NoAPIName, PPB_AUDIO_CONFIG_INTERFACE_1_0, PPB_AudioConfig_1_0)
PROXIED_IFACE(NoAPIName, PPB_AUDIO_CONFIG_INTERFACE_1_1, PPB_AudioConfig_1_1)
#if !defined(OS_NACL) // TODO(bbudge) Port to NaCl.
-PROXIED_IFACE(PPB_Graphics3D, PPB_GRAPHICS_3D_INTERFACE_1_0, PPB_Graphics3D_1_0)
PROXIED_IFACE(PPB_Instance, PPB_MOUSECURSOR_INTERFACE_1_0, PPB_MouseCursor_1_0)
#endif // !defined(OS_NACL)
diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h
index baba496..d3f53a7 100644
--- a/ppapi/thunk/resource_creation_api.h
+++ b/ppapi/thunk/resource_creation_api.h
@@ -110,6 +110,12 @@ class ResourceCreationAPI {
virtual PP_Resource CreateGraphics2D(PP_Instance instance,
const PP_Size& size,
PP_Bool is_always_opaque) = 0;
+ virtual PP_Resource CreateGraphics3D(PP_Instance instance,
+ PP_Resource share_context,
+ const int32_t* attrib_list) = 0;
+ virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance,
+ PP_Resource share_context,
+ const int32_t* attrib_list) = 0;
#if !defined(OS_NACL)
virtual PP_Resource CreateAudioInput0_1(
PP_Instance instance,
@@ -131,12 +137,6 @@ class ResourceCreationAPI {
virtual PP_Resource CreateFlashMenu(PP_Instance instance,
const PP_Flash_Menu* menu_data) = 0;
virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0;
- virtual PP_Resource CreateGraphics3D(PP_Instance instance,
- PP_Resource share_context,
- const int32_t* attrib_list) = 0;
- virtual PP_Resource CreateGraphics3DRaw(PP_Instance instance,
- PP_Resource share_context,
- const int32_t* attrib_list) = 0;
virtual PP_Resource CreateHostResolverPrivate(PP_Instance instance) = 0;
virtual PP_Resource CreateNetworkMonitor(
PP_Instance instance,