diff options
Diffstat (limited to 'gpu')
159 files changed, 3559 insertions, 1091 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt new file mode 100644 index 0000000000..98763d0a38 --- /dev/null +++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_query.txt @@ -0,0 +1,53 @@ +Name + + CHROMIUM_sync_query + +Name Strings + + GL_CHROMIUM_sync_query + +Version + + Last Modifed Date: April 15, 2014 + +Dependencies + + OpenGL ES 2.0 is required. + + EXT_occlusion_query_boolean is required. + +Overview + + This extension provides a query mechanism that allow for synchronization + between the host CPU and the GPU, which may be accessing the same + resources (typically memory). + + This extension is useful in conjunction with CHROMIUM_map_image to + determine when it is safe to access a mapped image. Once the result of + a COMMANDS_COMPLETED_CHROMIUM query is available, all drawing commands + issued before the query must have finished. This ensures that the memory + corresponding to the issued commands can be safely modified (assuming no + other outstanding drawing commands are issued subsequent to the query). + +New Procedures and Functions + + None. + +Errors + + None. + +New Tokens + + Accepted by the <target> parameter of BeginQueryEXT, EndQueryEXT, + and GetQueryivEXT: + + COMMANDS_COMPLETED_CHROMIUM 0x84F7 + +New State + + None. + +Revision History + + 4/15/2014 Documented the extension diff --git a/gpu/GLES2/gl2extchromium.h b/gpu/GLES2/gl2extchromium.h index db4f12ff90..0bdf7174f1 100644 --- a/gpu/GLES2/gl2extchromium.h +++ b/gpu/GLES2/gl2extchromium.h @@ -692,6 +692,15 @@ typedef void(GL_APIENTRYP PFNGLSCHEDULEOVERLAYPLANECHROMIUMPROC)( GLfloat uv_height); #endif /* GL_CHROMIUM_schedule_overlay_plane */ +/* GL_CHROMIUM_sync_query */ +#ifndef GL_CHROMIUM_sync_query +#define GL_CHROMIUM_sync_query 1 + +#ifndef GL_COMMANDS_COMPLETED_CHROMIUM +#define GL_COMMANDS_COMPLETED_CHROMIUM 0x84F7 +#endif +#endif /* GL_CHROMIUM_sync_query */ + #ifdef __cplusplus } #endif diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 84d70c0d41..7105edf4cb 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -841,6 +841,7 @@ _ENUM_LISTS = { 'GL_LATENCY_QUERY_CHROMIUM', 'GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM', 'GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM', + 'GL_COMMANDS_COMPLETED_CHROMIUM', ], }, 'RenderBufferParameter': { diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc index d8ca8237a1..080aa6b357 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.cc +++ b/gpu/command_buffer/client/cmd_buffer_helper.cc @@ -105,20 +105,11 @@ bool CommandBufferHelper::AllocateRingBuffer() { ring_buffer_ = buffer; ring_buffer_id_ = id; command_buffer_->SetGetBuffer(id); - - // TODO(gman): Do we really need to call GetState here? We know get & put = 0 - // Also do we need to check state.num_entries? - CommandBuffer::State state = command_buffer_->GetState(); entries_ = static_cast<CommandBufferEntry*>(ring_buffer_->memory()); - int32 num_ring_buffer_entries = - ring_buffer_size_ / sizeof(CommandBufferEntry); - if (num_ring_buffer_entries > state.num_entries) { - ClearUsable(); - return false; - } - - total_entry_count_ = num_ring_buffer_entries; - put_ = state.put_offset; + total_entry_count_ = ring_buffer_size_ / sizeof(CommandBufferEntry); + // Call to SetGetBuffer(id) above resets get and put offsets to 0. + // No need to query it through IPC. + put_ = 0; CalcImmediateEntries(0); return true; } diff --git a/gpu/command_buffer/client/gl_in_process_context.h b/gpu/command_buffer/client/gl_in_process_context.h index be91cfdc1a..60a16653d9 100644 --- a/gpu/command_buffer/client/gl_in_process_context.h +++ b/gpu/command_buffer/client/gl_in_process_context.h @@ -7,7 +7,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" -#include "gles2_impl_export.h" +#include "gl_in_process_context_export.h" #include "gpu/command_buffer/service/in_process_command_buffer.h" #include "ui/gfx/native_widget_types.h" #include "ui/gl/gl_surface.h" @@ -30,7 +30,7 @@ class GLES2Implementation; } // The default uninitialized value is -1. -struct GLES2_IMPL_EXPORT GLInProcessContextAttribs { +struct GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContextAttribs { GLInProcessContextAttribs(); int32 alpha_size; @@ -45,7 +45,7 @@ struct GLES2_IMPL_EXPORT GLInProcessContextAttribs { int32 lose_context_when_out_of_memory; }; -class GLES2_IMPL_EXPORT GLInProcessContext { +class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext { public: virtual ~GLInProcessContext() {} diff --git a/gpu/command_buffer/client/gl_in_process_context_export.h b/gpu/command_buffer/client/gl_in_process_context_export.h new file mode 100644 index 0000000000..36c4a34df9 --- /dev/null +++ b/gpu/command_buffer/client/gl_in_process_context_export.h @@ -0,0 +1,29 @@ +// 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. + +#ifndef GL_IN_PROCESS_CONTEXT_EXPORT_H_ +#define GL_IN_PROCESS_CONTEXT_EXPORT_H_ + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(GL_IN_PROCESS_CONTEXT_IMPLEMENTATION) +#define GL_IN_PROCESS_CONTEXT_EXPORT __declspec(dllexport) +#else +#define GL_IN_PROCESS_CONTEXT_EXPORT __declspec(dllimport) +#endif // defined(GL_IN_PROCESS_CONTEXT_IMPLEMENTATION) + +#else // defined(WIN32) +#if defined(GL_IN_PROCESS_CONTEXT_IMPLEMENTATION) +#define GL_IN_PROCESS_CONTEXT_EXPORT __attribute__((visibility("default"))) +#else +#define GL_IN_PROCESS_CONTEXT_EXPORT +#endif +#endif + +#else // defined(COMPONENT_BUILD) +#define GL_IN_PROCESS_CONTEXT_EXPORT +#endif + +#endif // GL_IN_PROCESS_CONTEXT_EXPORT_H_ diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc index a280e4f3ce..cb7f6bdddb 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest.cc +++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc @@ -2906,9 +2906,6 @@ TEST_F(GLES2ImplementationTest, BeginEndQueryEXT) { EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); - // Test BeginQueryEXT fails if id not GENed. - // TODO(gman): - // Test BeginQueryEXT inserts command. struct BeginCmds { cmds::BeginQueryEXT begin_query; @@ -2996,7 +2993,6 @@ TEST_F(GLES2ImplementationTest, BeginEndQueryEXT) { // Test GetQueryObjectuivEXT CheckResultsAvailable ClearCommands(); gl_->GetQueryObjectuivEXT(id1, GL_QUERY_RESULT_AVAILABLE_EXT, &available); - EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(0u, available); } diff --git a/gpu/command_buffer/client/query_tracker.cc b/gpu/command_buffer/client/query_tracker.cc index 5ac89e07e0..6395c04778 100644 --- a/gpu/command_buffer/client/query_tracker.cc +++ b/gpu/command_buffer/client/query_tracker.cc @@ -93,7 +93,7 @@ QueryTracker::Query::Query(GLuint id, GLenum target, state_(kUninitialized), submit_count_(0), token_(0), - flushed_(false), + flush_count_(0), client_begin_time_us_(0), result_(0) { } @@ -140,6 +140,7 @@ void QueryTracker::Query::End(GLES2Implementation* gl) { } } } + flush_count_ = gl->helper()->flush_generation(); gl->helper()->EndQueryEXT(target(), submit_count()); MarkAsPending(gl->helper()->InsertToken()); } @@ -168,12 +169,7 @@ bool QueryTracker::Query::CheckResultsAvailable( } state_ = kComplete; } else { - if (!flushed_) { - // TODO(gman): We could reduce the number of flushes by having a - // flush count, recording that count at the time we insert the - // EndQuery command and then only flushing here if we've have not - // passed that count yet. - flushed_ = true; + if ((helper->flush_generation() - flush_count_ - 1) >= 0x80000000) { helper->Flush(); } else { // Insert no-ops so that eventually the GPU process will see more work. diff --git a/gpu/command_buffer/client/query_tracker.h b/gpu/command_buffer/client/query_tracker.h index 219f18665a..72e29e71c4 100644 --- a/gpu/command_buffer/client/query_tracker.h +++ b/gpu/command_buffer/client/query_tracker.h @@ -113,7 +113,6 @@ class GLES2_IMPL_EXPORT QueryTracker { void MarkAsPending(int32 token) { token_ = token; state_ = kPending; - flushed_ = false; } base::subtle::Atomic32 submit_count() const { return submit_count_; } @@ -147,7 +146,7 @@ class GLES2_IMPL_EXPORT QueryTracker { State state_; base::subtle::Atomic32 submit_count_; int32 token_; - bool flushed_; + uint32 flush_count_; uint64 client_begin_time_us_; // Only used for latency query target. uint32 result_; }; diff --git a/gpu/command_buffer/client/query_tracker_unittest.cc b/gpu/command_buffer/client/query_tracker_unittest.cc index 0820a994cd..cd2ccf6329 100644 --- a/gpu/command_buffer/client/query_tracker_unittest.cc +++ b/gpu/command_buffer/client/query_tracker_unittest.cc @@ -107,6 +107,8 @@ class QueryTrackerTest : public testing::Test { return query->info_.bucket; } + uint32 GetFlushGeneration() { return helper_->flush_generation(); } + scoped_ptr<CommandBuffer> command_buffer_; scoped_ptr<GLES2CmdHelper> helper_; scoped_ptr<MappedMemoryManager> mapped_memory_; @@ -164,6 +166,27 @@ TEST_F(QueryTrackerTest, Query) { EXPECT_FALSE(query->NeverUsed()); EXPECT_TRUE(query->Pending()); + // Flush only once if no more flushes happened between a call to + // EndQuery command and CheckResultsAvailable + // Advance put_ so flush calls in CheckResultsAvailable go through + // and updates flush_generation count + helper_->Noop(1); + // Set Query in pending state_ to simulate EndQuery command is called + query->MarkAsPending(kToken); + EXPECT_TRUE(query->Pending()); + // Store FlushGeneration count after EndQuery is called + uint32 gen1 = GetFlushGeneration(); + EXPECT_FALSE(query->CheckResultsAvailable(helper_.get())); + uint32 gen2 = GetFlushGeneration(); + EXPECT_NE(gen1, gen2); + // Repeated calls to CheckResultsAvailable should not flush unnecessarily + EXPECT_FALSE(query->CheckResultsAvailable(helper_.get())); + gen1 = GetFlushGeneration(); + EXPECT_EQ(gen1, gen2); + EXPECT_FALSE(query->CheckResultsAvailable(helper_.get())); + gen1 = GetFlushGeneration(); + EXPECT_EQ(gen1, gen2); + // Simulate GPU process marking it as available. QuerySync* sync = GetSync(query); sync->process_count = query->submit_count(); diff --git a/gpu/command_buffer/common/capabilities.cc b/gpu/command_buffer/common/capabilities.cc index 9f35c8258d..efc63ebef1 100644 --- a/gpu/command_buffer/common/capabilities.cc +++ b/gpu/command_buffer/common/capabilities.cc @@ -17,6 +17,7 @@ Capabilities::Capabilities() texture_usage(false), texture_storage(false), discard_framebuffer(false), + sync_query(false), map_image(false) {} } // namespace gpu diff --git a/gpu/command_buffer/common/capabilities.h b/gpu/command_buffer/common/capabilities.h index b6c34daeef..81e3d55e71 100644 --- a/gpu/command_buffer/common/capabilities.h +++ b/gpu/command_buffer/common/capabilities.h @@ -20,6 +20,7 @@ struct GPU_EXPORT Capabilities { bool texture_usage; bool texture_storage; bool discard_framebuffer; + bool sync_query; // Capabilities below are not populated by GLES2Decoder. bool map_image; diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h index 62f1c308c1..e9f4f699ad 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h @@ -179,6 +179,7 @@ static const GLES2Util::EnumToString enum_to_string_table[] = { {0x84F4, "GL_FENCE_CONDITION_NV", }, {0x8366, "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT", }, {0x8365, "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT", }, + {0x84F7, "GL_COMMANDS_COMPLETED_CHROMIUM", }, {0x881E, "GL_LUMINANCE16F_EXT", }, {0x84FA, "GL_UNSIGNED_INT_24_8_OES", }, {0x881F, "GL_LUMINANCE_ALPHA16F_EXT", }, @@ -353,6 +354,7 @@ static const GLES2Util::EnumToString enum_to_string_table[] = { {0x8C93, "GL_ATC_RGBA_EXPLICIT_ALPHA_AMD", }, {0x00000002, "GL_CONTEXT_FLAG_DEBUG_BIT_KHR", }, {0x00000001, "GL_SYNC_FLUSH_COMMANDS_BIT_APPLE", }, + {0x9248, "GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM", }, {0x00000004, "GL_COLOR_BUFFER_BIT2_QCOM", }, {0x1702, "GL_TEXTURE", }, {0x00000008, "GL_COLOR_BUFFER_BIT3_QCOM", }, @@ -385,6 +387,7 @@ static const GLES2Util::EnumToString enum_to_string_table[] = { {0x8DF6, "GL_UNSIGNED_INT_10_10_10_2_OES", }, {0x8230, "GL_RG32F_EXT", }, {0x8DF7, "GL_INT_10_10_10_2_OES", }, + {0x9246, "GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM", }, {0x8B69, "GL_FLOAT_MAT4x2_NV", }, {0x812D, "GL_CLAMP_TO_BORDER_NV", }, {0x812F, "GL_CLAMP_TO_EDGE", }, @@ -604,8 +607,11 @@ static const GLES2Util::EnumToString enum_to_string_table[] = { {0x1F02, "GL_VERSION", }, {0x1F01, "GL_RENDERER", }, {0x1F00, "GL_VENDOR", }, + {0x9247, "GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM", }, {0x2701, "GL_LINEAR_MIPMAP_NEAREST", }, + {0x9245, "GL_OVERLAY_TRANSFORM_NONE_CHROMIUM", }, {0x92B4, "GL_INVERT_OVG_NV", }, + {0x9249, "GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM", }, {0x0B94, "GL_STENCIL_FAIL", }, {0x8B4C, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS", }, {0x8B4D, "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS", }, @@ -634,6 +640,7 @@ static const GLES2Util::EnumToString enum_to_string_table[] = { {0x1004, "GL_TEXTURE_BORDER_COLOR_NV", }, {0x8B48, "GL_SHADER_OBJECT_EXT", }, {0x912F, "GL_TEXTURE_IMMUTABLE_FORMAT_EXT", }, + {0x924A, "GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM", }, {0x20000000, "GL_MULTISAMPLE_BUFFER_BIT5_QCOM", }, {0x0DE1, "GL_TEXTURE_2D", }, {0x80C9, "GL_BLEND_SRC_RGB", }, @@ -1163,7 +1170,8 @@ std::string GLES2Util::GetStringQueryTarget(uint32 value) { {GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM, "GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM"}, {GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, - "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM"}, }; + "GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM"}, + {GL_COMMANDS_COMPLETED_CHROMIUM, "GL_COMMANDS_COMPLETED_CHROMIUM"}, }; return GLES2Util::GetQualifiedEnumString( string_table, arraysize(string_table), value); } diff --git a/gpu/command_buffer/gles2_utils.target.darwin-arm.mk b/gpu/command_buffer/gles2_utils.target.darwin-arm.mk index 7ce59ea055..ed4442a691 100644 --- a/gpu/command_buffer/gles2_utils.target.darwin-arm.mk +++ b/gpu/command_buffer/gles2_utils.target.darwin-arm.mk @@ -226,7 +226,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/gles2_utils.target.darwin-mips.mk b/gpu/command_buffer/gles2_utils.target.darwin-mips.mk index 92a020d042..51d09c780e 100644 --- a/gpu/command_buffer/gles2_utils.target.darwin-mips.mk +++ b/gpu/command_buffer/gles2_utils.target.darwin-mips.mk @@ -222,7 +222,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/gles2_utils.target.darwin-x86.mk b/gpu/command_buffer/gles2_utils.target.darwin-x86.mk index f865de636e..7ed5b6a05a 100644 --- a/gpu/command_buffer/gles2_utils.target.darwin-x86.mk +++ b/gpu/command_buffer/gles2_utils.target.darwin-x86.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/gles2_utils.target.darwin-x86_64.mk b/gpu/command_buffer/gles2_utils.target.darwin-x86_64.mk index 1f838d2a7b..b785282527 100644 --- a/gpu/command_buffer/gles2_utils.target.darwin-x86_64.mk +++ b/gpu/command_buffer/gles2_utils.target.darwin-x86_64.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/gles2_utils.target.linux-arm.mk b/gpu/command_buffer/gles2_utils.target.linux-arm.mk index 7ce59ea055..ed4442a691 100644 --- a/gpu/command_buffer/gles2_utils.target.linux-arm.mk +++ b/gpu/command_buffer/gles2_utils.target.linux-arm.mk @@ -226,7 +226,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/gles2_utils.target.linux-mips.mk b/gpu/command_buffer/gles2_utils.target.linux-mips.mk index 92a020d042..51d09c780e 100644 --- a/gpu/command_buffer/gles2_utils.target.linux-mips.mk +++ b/gpu/command_buffer/gles2_utils.target.linux-mips.mk @@ -222,7 +222,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/gles2_utils.target.linux-x86.mk b/gpu/command_buffer/gles2_utils.target.linux-x86.mk index f865de636e..7ed5b6a05a 100644 --- a/gpu/command_buffer/gles2_utils.target.linux-x86.mk +++ b/gpu/command_buffer/gles2_utils.target.linux-x86.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/gles2_utils.target.linux-x86_64.mk b/gpu/command_buffer/gles2_utils.target.linux-x86_64.mk index 1f838d2a7b..b785282527 100644 --- a/gpu/command_buffer/gles2_utils.target.linux-x86_64.mk +++ b/gpu/command_buffer/gles2_utils.target.linux-x86_64.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer/service/async_pixel_transfer_delegate.h b/gpu/command_buffer/service/async_pixel_transfer_delegate.h index 47d71d8a90..b41bcd5244 100644 --- a/gpu/command_buffer/service/async_pixel_transfer_delegate.h +++ b/gpu/command_buffer/service/async_pixel_transfer_delegate.h @@ -21,8 +21,6 @@ class SharedMemory; namespace gpu { -class ScopedSafeSharedMemory; - struct AsyncTexImage2DParams { GLenum target; GLint level; diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager.cc b/gpu/command_buffer/service/async_pixel_transfer_manager.cc index 3084dd6196..efc893a40c 100644 --- a/gpu/command_buffer/service/async_pixel_transfer_manager.cc +++ b/gpu/command_buffer/service/async_pixel_transfer_manager.cc @@ -17,6 +17,12 @@ AsyncPixelTransferManager::AsyncPixelTransferManager() {} AsyncPixelTransferManager::~AsyncPixelTransferManager() { if (manager_) manager_->RemoveObserver(this); + + for (TextureToDelegateMap::iterator ref = delegate_map_.begin(); + ref != delegate_map_.end(); + ref++) { + ref->first->RemoveObserver(); + } } void AsyncPixelTransferManager::Initialize(gles2::TextureManager* manager) { @@ -32,6 +38,7 @@ AsyncPixelTransferManager::CreatePixelTransferDelegate( AsyncPixelTransferDelegate* delegate = CreatePixelTransferDelegateImpl(ref, define_params); delegate_map_[ref] = make_linked_ptr(delegate); + ref->AddObserver(); return delegate; } @@ -49,8 +56,10 @@ AsyncPixelTransferManager::GetPixelTransferDelegate( void AsyncPixelTransferManager::ClearPixelTransferDelegateForTest( gles2::TextureRef* ref) { TextureToDelegateMap::iterator it = delegate_map_.find(ref); - if (it != delegate_map_.end()) + if (it != delegate_map_.end()) { delegate_map_.erase(it); + ref->RemoveObserver(); + } } bool AsyncPixelTransferManager::AsyncTransferIsInProgress( @@ -69,8 +78,10 @@ void AsyncPixelTransferManager::OnTextureManagerDestroying( void AsyncPixelTransferManager::OnTextureRefDestroying( gles2::TextureRef* texture) { TextureToDelegateMap::iterator it = delegate_map_.find(texture); - if (it != delegate_map_.end()) + if (it != delegate_map_.end()) { delegate_map_.erase(it); + texture->RemoveObserver(); + } } } // namespace gpu diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index fb97dafa50..ba0437bfd4 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -223,18 +223,24 @@ bool ContextGroup::Initialize( return false; } - // TODO(gman): Use workarounds similar to max_texture_size above to implement. - if (gfx::GetGLImplementation() == gfx::kGLImplementationOSMesaGL) { - // Some shaders in Skia needed more than the min. - max_fragment_uniform_vectors_ = - std::min(static_cast<uint32>(kMinFragmentUniformVectors * 2), - max_fragment_uniform_vectors_); - max_varying_vectors_ = - std::min(static_cast<uint32>(kMinVaryingVectors * 2), - max_varying_vectors_); + // Some shaders in Skia need more than the min available vertex and + // fragment shader uniform vectors in case of OSMesa GL Implementation + if (feature_info_->workarounds().max_fragment_uniform_vectors) { + max_fragment_uniform_vectors_ = std::min( + max_fragment_uniform_vectors_, + static_cast<uint32>( + feature_info_->workarounds().max_fragment_uniform_vectors)); + } + if (feature_info_->workarounds().max_varying_vectors) { + max_varying_vectors_ = std::min( + max_varying_vectors_, + static_cast<uint32>(feature_info_->workarounds().max_varying_vectors)); + } + if (feature_info_->workarounds().max_vertex_uniform_vectors) { max_vertex_uniform_vectors_ = - std::min(static_cast<uint32>(kMinVertexUniformVectors * 2), - max_vertex_uniform_vectors_); + std::min(max_vertex_uniform_vectors_, + static_cast<uint32>( + feature_info_->workarounds().max_vertex_uniform_vectors)); } program_manager_.reset(new ProgramManager( diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc index 6c8165575f..2eb3f99ed4 100644 --- a/gpu/command_buffer/service/context_state.cc +++ b/gpu/command_buffer/service/context_state.cc @@ -188,29 +188,87 @@ void ContextState::RestoreActiveTextureUnitBinding(unsigned int target) const { glBindTexture(target, GetServiceId(texture_unit, target)); } -void ContextState::RestoreAttribute(GLuint attrib_index) const { - const VertexAttrib* attrib = - vertex_attrib_manager->GetVertexAttrib(attrib_index); - const void* ptr = reinterpret_cast<const void*>(attrib->offset()); - Buffer* buffer = attrib->buffer(); - glBindBuffer(GL_ARRAY_BUFFER, buffer ? buffer->service_id() : 0); - glVertexAttribPointer( - attrib_index, attrib->size(), attrib->type(), attrib->normalized(), - attrib->gl_stride(), ptr); - if (attrib->divisor()) - glVertexAttribDivisorANGLE(attrib_index, attrib->divisor()); - // Never touch vertex attribute 0's state (in particular, never - // disable it) when running on desktop GL because it will never be - // re-enabled. - if (attrib_index != 0 || - gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) { - if (attrib->enabled()) { - glEnableVertexAttribArray(attrib_index); +void ContextState::RestoreVertexAttribValues() const { + for (size_t attrib = 0; attrib < vertex_attrib_manager->num_attribs(); + ++attrib) { + glVertexAttrib4fv(attrib, attrib_values[attrib].v); + } +} + +void ContextState::RestoreVertexAttribArrays( + const scoped_refptr<VertexAttribManager> attrib_manager) const { + // This is expected to be called only for VAO with service_id 0, + // either to restore the default VAO or a virtual VAO with service_id 0. + GLuint vao_service_id = attrib_manager->service_id(); + DCHECK(vao_service_id == 0); + + // Bind VAO if supported. + if (feature_info_->feature_flags().native_vertex_array_object) + glBindVertexArrayOES(vao_service_id); + + // Restore vertex attrib arrays. + for (size_t attrib_index = 0; attrib_index < attrib_manager->num_attribs(); + ++attrib_index) { + const VertexAttrib* attrib = attrib_manager->GetVertexAttrib(attrib_index); + + // Restore vertex array. + Buffer* buffer = attrib->buffer(); + GLuint buffer_service_id = buffer ? buffer->service_id() : 0; + glBindBuffer(GL_ARRAY_BUFFER, buffer_service_id); + const void* ptr = reinterpret_cast<const void*>(attrib->offset()); + glVertexAttribPointer(attrib_index, + attrib->size(), + attrib->type(), + attrib->normalized(), + attrib->gl_stride(), + ptr); + + // Restore attrib divisor if supported. + if (feature_info_->feature_flags().angle_instanced_arrays) + glVertexAttribDivisorANGLE(attrib_index, attrib->divisor()); + + // Never touch vertex attribute 0's state (in particular, never + // disable it) when running on desktop GL because it will never be + // re-enabled. + if (attrib_index != 0 || + gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) { + if (attrib->enabled()) { + glEnableVertexAttribArray(attrib_index); + } else { + glDisableVertexAttribArray(attrib_index); + } + } + } +} + +void ContextState::RestoreVertexAttribs() const { + // Restore Vertex Attrib Arrays + // TODO: This if should not be needed. RestoreState is getting called + // before GLES2Decoder::Initialize which is a bug. + if (vertex_attrib_manager.get()) { + // Restore VAOs. + if (feature_info_->feature_flags().native_vertex_array_object) { + // If default VAO is still using shared id 0 instead of unique ids + // per-context, default VAO state must be restored. + GLuint default_vao_service_id = + default_vertex_attrib_manager->service_id(); + if (default_vao_service_id == 0) + RestoreVertexAttribArrays(default_vertex_attrib_manager); + + // Restore the current VAO binding, unless it's the same as the + // default above. + GLuint curr_vao_service_id = vertex_attrib_manager->service_id(); + if (curr_vao_service_id != 0) + glBindVertexArrayOES(curr_vao_service_id); } else { - glDisableVertexAttribArray(attrib_index); + // If native VAO isn't supported, emulated VAOs are used. + // Restore to the currently bound VAO. + RestoreVertexAttribArrays(vertex_attrib_manager); } } - glVertexAttrib4fv(attrib_index, attrib_values[attrib_index].v); + + // glVertexAttrib4fv aren't part of VAO state and must be restored. + RestoreVertexAttribValues(); } void ContextState::RestoreGlobalState(const ContextState* prev_state) const { @@ -220,18 +278,7 @@ void ContextState::RestoreGlobalState(const ContextState* prev_state) const { void ContextState::RestoreState(const ContextState* prev_state) const { RestoreAllTextureUnitBindings(prev_state); - - // Restore Attrib State - // TODO: This if should not be needed. RestoreState is getting called - // before GLES2Decoder::Initialize which is a bug. - if (vertex_attrib_manager.get()) { - // TODO(gman): Move this restoration to VertexAttribManager. - for (size_t attrib = 0; attrib < vertex_attrib_manager->num_attribs(); - ++attrib) { - RestoreAttribute(attrib); - } - } - + RestoreVertexAttribs(); RestoreBufferBindings(); RestoreRenderbufferBindings(); RestoreProgramBindings(); diff --git a/gpu/command_buffer/service/context_state.h b/gpu/command_buffer/service/context_state.h index d68700fab8..83818e9b05 100644 --- a/gpu/command_buffer/service/context_state.h +++ b/gpu/command_buffer/service/context_state.h @@ -108,7 +108,10 @@ struct GPU_EXPORT ContextState { void RestoreActiveTexture() const; void RestoreAllTextureUnitBindings(const ContextState* prev_state) const; void RestoreActiveTextureUnitBinding(unsigned int target) const; - void RestoreAttribute(GLuint index) const; + void RestoreVertexAttribValues() const; + void RestoreVertexAttribArrays( + const scoped_refptr<VertexAttribManager> attrib_manager) const; + void RestoreVertexAttribs() const; void RestoreBufferBindings() const; void RestoreGlobalState(const ContextState* prev_state) const; void RestoreProgramBindings() const; @@ -146,6 +149,7 @@ struct GPU_EXPORT ContextState { // Class that manages vertex attribs. scoped_refptr<VertexAttribManager> vertex_attrib_manager; + scoped_refptr<VertexAttribManager> default_vertex_attrib_manager; // The program in use by glUseProgram scoped_refptr<Program> current_program; diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index 66e6a54eaf..c7557ebaba 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -8,6 +8,7 @@ #include "base/command_line.h" #include "base/macros.h" +#include "base/metrics/histogram.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" @@ -95,6 +96,13 @@ void StringToWorkarounds( workarounds->max_cube_map_texture_size = 1024; if (workarounds->max_cube_map_texture_size_limit_512) workarounds->max_cube_map_texture_size = 512; + + if (workarounds->max_fragment_uniform_vectors_32) + workarounds->max_fragment_uniform_vectors = 32; + if (workarounds->max_varying_vectors_16) + workarounds->max_varying_vectors = 16; + if (workarounds->max_vertex_uniform_vectors_256) + workarounds->max_vertex_uniform_vectors = 256; } } // anonymous namespace. @@ -103,6 +111,7 @@ FeatureInfo::FeatureFlags::FeatureFlags() : chromium_color_buffer_float_rgba(false), chromium_color_buffer_float_rgb(false), chromium_framebuffer_multisample(false), + chromium_sync_query(false), use_core_framebuffer_multisample(false), multisampled_render_to_texture(false), use_img_for_multisampled_render_to_texture(false), @@ -127,6 +136,7 @@ FeatureInfo::FeatureFlags::FeatureFlags() enable_samplers(false), ext_draw_buffers(false), ext_frag_depth(false), + ext_shader_texture_lod(false), use_async_readpixels(false), map_buffer_range(false), ext_discard_framebuffer(false), @@ -142,7 +152,10 @@ FeatureInfo::Workarounds::Workarounds() : GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) #undef GPU_OP max_texture_size(0), - max_cube_map_texture_size(0) { + max_cube_map_texture_size(0), + max_fragment_uniform_vectors(0), + max_varying_vectors(0), + max_vertex_uniform_vectors(0) { } FeatureInfo::FeatureInfo() { @@ -747,9 +760,16 @@ void FeatureInfo::InitializeFeatures() { feature_flags_.ext_frag_depth = true; } - bool ui_gl_fence_works = extensions.Contains("GL_NV_fence") || + if (extensions.Contains("GL_EXT_shader_texture_lod") || + gfx::HasDesktopGLFeatures()) { + AddExtensionString("GL_EXT_shader_texture_lod"); + feature_flags_.ext_shader_texture_lod = true; + } + + bool ui_gl_fence_works = is_es3 || extensions.Contains("GL_NV_fence") || extensions.Contains("GL_ARB_sync") || extensions.Contains("EGL_KHR_fence_sync"); + UMA_HISTOGRAM_BOOLEAN("GPU.FenceSupport", ui_gl_fence_works); feature_flags_.map_buffer_range = is_es3 || extensions.Contains("GL_ARB_map_buffer_range"); @@ -777,6 +797,11 @@ void FeatureInfo::InitializeFeatures() { AddExtensionString("GL_EXT_discard_framebuffer"); feature_flags_.ext_discard_framebuffer = true; } + + if (ui_gl_fence_works) { + AddExtensionString("GL_CHROMIUM_sync_query"); + feature_flags_.chromium_sync_query = true; + } } void FeatureInfo::AddExtensionString(const std::string& str) { diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h index 039b926279..8e9c07cac3 100644 --- a/gpu/command_buffer/service/feature_info.h +++ b/gpu/command_buffer/service/feature_info.h @@ -31,6 +31,7 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { bool chromium_color_buffer_float_rgba; bool chromium_color_buffer_float_rgb; bool chromium_framebuffer_multisample; + bool chromium_sync_query; // Use glBlitFramebuffer() and glRenderbufferStorageMultisample() with // GL_EXT_framebuffer_multisample-style semantics, since they are exposed // as core GL functions on this implementation. @@ -59,6 +60,7 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { bool enable_samplers; bool ext_draw_buffers; bool ext_frag_depth; + bool ext_shader_texture_lod; bool use_async_readpixels; bool map_buffer_range; bool ext_discard_framebuffer; @@ -79,6 +81,9 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { // Note: 0 here means use driver limit. GLint max_texture_size; GLint max_cube_map_texture_size; + GLint max_fragment_uniform_vectors; + GLint max_varying_vectors; + GLint max_vertex_uniform_vectors; }; // Constructor with workarounds taken from the current process's CommandLine diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index 1a8cc126f5..03c55cce63 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc @@ -914,6 +914,12 @@ TEST_F(FeatureInfoTest, InitializeEXT_frag_depth) { EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_frag_depth")); } +TEST_F(FeatureInfoTest, InitializeEXT_shader_texture_lod) { + SetupInitExpectations("GL_EXT_shader_texture_lod"); + EXPECT_TRUE(info_->feature_flags().ext_shader_texture_lod); + EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_shader_texture_lod")); +} + TEST_F(FeatureInfoTest, InitializeEXT_discard_framebuffer) { SetupInitExpectations("GL_EXT_discard_framebuffer"); EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer); @@ -936,7 +942,7 @@ TEST_F(FeatureInfoTest, InitializeWithES3) { EXPECT_TRUE(info_->feature_flags().use_core_framebuffer_multisample); EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_framebuffer_multisample")); - EXPECT_FALSE(info_->feature_flags().use_async_readpixels); + EXPECT_TRUE(info_->feature_flags().use_async_readpixels); EXPECT_TRUE(info_->feature_flags().oes_depth24); EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture")); EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_depth_texture")); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 80ca209929..fdd08f48b8 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -82,6 +82,7 @@ namespace { static const char kOESDerivativeExtension[] = "GL_OES_standard_derivatives"; static const char kEXTFragDepthExtension[] = "GL_EXT_frag_depth"; static const char kEXTDrawBuffersExtension[] = "GL_EXT_draw_buffers"; +static const char kEXTShaderTextureLodExtension[] = "GL_EXT_shader_texture_lod"; #if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108 khronos_uint64_t CityHashForAngle(const char* name, unsigned int len) { @@ -611,9 +612,6 @@ class GLES2DecoderImpl : public GLES2Decoder, unsigned int target) const OVERRIDE { state_.RestoreActiveTextureUnitBinding(target); } - virtual void RestoreAttribute(unsigned index) const OVERRIDE { - state_.RestoreAttribute(index); - } virtual void RestoreBufferBindings() const OVERRIDE { state_.RestoreBufferBindings(); } @@ -1109,9 +1107,12 @@ class GLES2DecoderImpl : public GLES2Decoder, } // Creates a vertex attrib manager for the given vertex array. - void CreateVertexAttribManager(GLuint client_id, GLuint service_id) { + scoped_refptr<VertexAttribManager> CreateVertexAttribManager( + GLuint client_id, + GLuint service_id, + bool client_visible) { return vertex_array_manager()->CreateVertexAttribManager( - client_id, service_id, group_->max_vertex_attribs()); + client_id, service_id, group_->max_vertex_attribs(), client_visible); } void DoBindAttribLocation(GLuint client_id, GLuint index, const char* name); @@ -1661,9 +1662,6 @@ class GLES2DecoderImpl : public GLES2Decoder, bool unpack_premultiply_alpha_; bool unpack_unpremultiply_alpha_; - // Default vertex attribs manager, used when no VAOs are bound. - scoped_refptr<VertexAttribManager> default_vertex_attrib_manager_; - // The buffer we bind to attrib 0 since OpenGL requires it (ES does not). GLuint attrib_0_buffer_id_; @@ -1757,6 +1755,7 @@ class GLES2DecoderImpl : public GLES2Decoder, bool derivatives_explicitly_enabled_; bool frag_depth_explicitly_enabled_; bool draw_buffers_explicitly_enabled_; + bool shader_texture_lod_explicitly_enabled_; bool compile_shader_always_succeeds_; @@ -2260,6 +2259,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) derivatives_explicitly_enabled_(false), frag_depth_explicitly_enabled_(false), draw_buffers_explicitly_enabled_(false), + shader_texture_lod_explicitly_enabled_(false), compile_shader_always_succeeds_(false), lose_context_when_out_of_memory_(false), service_logging_(CommandLine::ForCurrentProcess()->HasSwitch( @@ -2360,16 +2360,25 @@ bool GLES2DecoderImpl::Initialize( disallowed_features_ = disallowed_features; state_.attrib_values.resize(group_->max_vertex_attribs()); - default_vertex_attrib_manager_ = new VertexAttribManager(); - default_vertex_attrib_manager_->Initialize( + vertex_array_manager_.reset(new VertexArrayManager()); + + GLuint default_vertex_attrib_service_id = 0; + if (features().native_vertex_array_object) { + glGenVertexArraysOES(1, &default_vertex_attrib_service_id); + glBindVertexArrayOES(default_vertex_attrib_service_id); + } + + state_.default_vertex_attrib_manager = + CreateVertexAttribManager(0, default_vertex_attrib_service_id, false); + + state_.default_vertex_attrib_manager->Initialize( group_->max_vertex_attribs(), feature_info_->workarounds().init_vertex_attributes); - // vertex_attrib_manager is set to default_vertex_attrib_manager_ by this call + // vertex_attrib_manager is set to default_vertex_attrib_manager by this call DoBindVertexArrayOES(0); query_manager_.reset(new QueryManager(this, feature_info_.get())); - vertex_array_manager_.reset(new VertexArrayManager()); util_.set_num_compressed_texture_formats( validators_->compressed_texture_format.GetValues().size()); @@ -2673,6 +2682,7 @@ Capabilities GLES2DecoderImpl::GetCapabilities() { caps.texture_storage = feature_info_->feature_flags().ext_texture_storage; caps.discard_framebuffer = feature_info_->feature_flags().ext_discard_framebuffer; + caps.sync_query = feature_info_->feature_flags().chromium_sync_query; #if defined(OS_MACOSX) // This is unconditionally true on mac, no need to test for it at runtime. @@ -2728,6 +2738,9 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() { resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_; if (!draw_buffers_explicitly_enabled_) resources.MaxDrawBuffers = 1; +#if (ANGLE_SH_VERSION >= 123) + resources.EXT_shader_texture_lod = shader_texture_lod_explicitly_enabled_; +#endif } else { resources.OES_standard_derivatives = features().oes_standard_derivatives ? 1 : 0; @@ -2739,6 +2752,10 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() { features().ext_draw_buffers ? 1 : 0; resources.EXT_frag_depth = features().ext_frag_depth ? 1 : 0; +#if (ANGLE_SH_VERSION >= 123) + resources.EXT_shader_texture_lod = + features().ext_shader_texture_lod ? 1 : 0; +#endif } ShShaderSpec shader_spec = force_webgl_glsl_validation_ ? SH_WEBGL_SPEC @@ -3309,7 +3326,7 @@ void GLES2DecoderImpl::Destroy(bool have_context) { // Unbind everything. state_.vertex_attrib_manager = NULL; - default_vertex_attrib_manager_ = NULL; + state_.default_vertex_attrib_manager = NULL; state_.texture_units.clear(); state_.bound_array_buffer = NULL; state_.current_queries.clear(); @@ -3904,6 +3921,11 @@ void GLES2DecoderImpl::RestoreTextureState(unsigned service_id) const { } void GLES2DecoderImpl::ClearAllAttributes() const { + // Must use native VAO 0, as RestoreAllAttributes can't fully restore + // other VAOs. + if (feature_info_->feature_flags().native_vertex_array_object) + glBindVertexArrayOES(0); + for (uint32 i = 0; i < group_->max_vertex_attribs(); ++i) { if (i != 0) // Never disable attribute 0 glDisableVertexAttribArray(i); @@ -3913,8 +3935,7 @@ void GLES2DecoderImpl::ClearAllAttributes() const { } void GLES2DecoderImpl::RestoreAllAttributes() const { - for (uint32 i = 0; i < group_->max_vertex_attribs(); ++i) - RestoreAttribute(i); + state_.RestoreVertexAttribs(); } void GLES2DecoderImpl::OnFboChanged() const { @@ -4487,7 +4508,7 @@ bool GLES2DecoderImpl::GetHelper( *num_written = 1; if (params) { if (state_.vertex_attrib_manager.get() != - default_vertex_attrib_manager_.get()) { + state_.default_vertex_attrib_manager.get()) { GLuint client_id = 0; vertex_array_manager_->GetClientId( state_.vertex_attrib_manager->service_id(), &client_id); @@ -7085,7 +7106,7 @@ error::Error GLES2DecoderImpl::HandleVertexAttribPointer( if (!state_.bound_array_buffer.get() || state_.bound_array_buffer->IsDeleted()) { if (state_.vertex_attrib_manager.get() == - default_vertex_attrib_manager_.get()) { + state_.default_vertex_attrib_manager.get()) { LOCAL_SET_GL_ERROR( GL_INVALID_VALUE, "glVertexAttribPointer", "no array buffer bound"); return error::kNoError; @@ -7738,6 +7759,14 @@ error::Error GLES2DecoderImpl::HandleGetString( std::string()); } } + if (!shader_texture_lod_explicitly_enabled_) { + size_t offset = extensions.find(kEXTShaderTextureLodExtension); + if (std::string::npos != offset) { + extensions.replace(offset, + arraysize(kEXTShaderTextureLodExtension), + std::string()); + } + } } else { extensions = feature_info_->extensions().c_str(); } @@ -9210,6 +9239,7 @@ error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM( bool desire_standard_derivatives = false; bool desire_frag_depth = false; bool desire_draw_buffers = false; + bool desire_shader_texture_lod = false; if (force_webgl_glsl_validation_) { desire_standard_derivatives = feature_str.find("GL_OES_standard_derivatives") != std::string::npos; @@ -9217,6 +9247,8 @@ error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM( feature_str.find("GL_EXT_frag_depth") != std::string::npos; desire_draw_buffers = feature_str.find("GL_EXT_draw_buffers") != std::string::npos; + desire_shader_texture_lod = + feature_str.find("GL_EXT_shader_texture_lod") != std::string::npos; } if (desire_webgl_glsl_validation != force_webgl_glsl_validation_ || @@ -9227,6 +9259,7 @@ error::Error GLES2DecoderImpl::HandleRequestExtensionCHROMIUM( derivatives_explicitly_enabled_ |= desire_standard_derivatives; frag_depth_explicitly_enabled_ |= desire_frag_depth; draw_buffers_explicitly_enabled_ |= desire_draw_buffers; + shader_texture_lod_explicitly_enabled_ |= desire_shader_texture_lod; InitializeShaderTranslator(); } @@ -9434,7 +9467,7 @@ bool GLES2DecoderImpl::GenQueriesEXTHelper( return false; } } - // NOTE: We don't generate Query objects here. Only in BeginQueryEXT + query_manager_->GenQueries(n, client_ids); return true; } @@ -9449,8 +9482,8 @@ void GLES2DecoderImpl::DeleteQueriesEXTHelper( state_.current_queries.erase(it); query->Destroy(true); - query_manager_->RemoveQuery(client_ids[ii]); } + query_manager_->RemoveQuery(client_ids[ii]); } } @@ -9513,6 +9546,14 @@ error::Error GLES2DecoderImpl::HandleBeginQueryEXT( case GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM: case GL_GET_ERROR_QUERY_CHROMIUM: break; + case GL_COMMANDS_COMPLETED_CHROMIUM: + if (!features().chromium_sync_query) { + LOCAL_SET_GL_ERROR( + GL_INVALID_OPERATION, "glBeginQueryEXT", + "not enabled for commands completed queries"); + return error::kNoError; + } + break; default: if (!features().occlusion_query_boolean) { LOCAL_SET_GL_ERROR( @@ -9536,24 +9577,12 @@ error::Error GLES2DecoderImpl::HandleBeginQueryEXT( QueryManager::Query* query = query_manager_->GetQuery(client_id); if (!query) { - // TODO(gman): Decide if we need this check. - // - // Checks id was made by glGenQueries - // - // From the POV of OpenGL ES 2.0 you need to call glGenQueriesEXT - // for all Query ids but from the POV of the command buffer service maybe - // you don't. - // - // The client can enforce this. I don't think the service cares. - // - // IdAllocatorInterface* id_allocator = - // group_->GetIdAllocator(id_namespaces::kQueries); - // if (!id_allocator->InUse(client_id)) { - // LOCAL_SET_GL_ERROR( - // GL_INVALID_OPERATION, - // "glBeginQueryEXT", "id not made by glGenQueriesEXT"); - // return error::kNoError; - // } + if (!query_manager_->IsValidQuery(client_id)) { + LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, + "glBeginQueryEXT", + "id not made by glGenQueriesEXT"); + return error::kNoError; + } query = query_manager_->CreateQuery( target, client_id, sync_shm_id, sync_shm_offset); } @@ -9610,14 +9639,14 @@ bool GLES2DecoderImpl::GenVertexArraysOESHelper( if (!features().native_vertex_array_object) { // Emulated VAO for (GLsizei ii = 0; ii < n; ++ii) { - CreateVertexAttribManager(client_ids[ii], 0); + CreateVertexAttribManager(client_ids[ii], 0, true); } } else { scoped_ptr<GLuint[]> service_ids(new GLuint[n]); glGenVertexArraysOES(n, service_ids.get()); for (GLsizei ii = 0; ii < n; ++ii) { - CreateVertexAttribManager(client_ids[ii], service_ids[ii]); + CreateVertexAttribManager(client_ids[ii], service_ids[ii], true); } } @@ -9631,7 +9660,7 @@ void GLES2DecoderImpl::DeleteVertexArraysOESHelper( GetVertexAttribManager(client_ids[ii]); if (vao && !vao->IsDeleted()) { if (state_.vertex_attrib_manager.get() == vao) { - state_.vertex_attrib_manager = default_vertex_attrib_manager_; + DoBindVertexArrayOES(0); } RemoveVertexAttribManager(client_ids[ii]); } @@ -9640,7 +9669,6 @@ void GLES2DecoderImpl::DeleteVertexArraysOESHelper( void GLES2DecoderImpl::DoBindVertexArrayOES(GLuint client_id) { VertexAttribManager* vao = NULL; - GLuint service_id = 0; if (client_id != 0) { vao = GetVertexAttribManager(client_id); if (!vao) { @@ -9652,11 +9680,9 @@ void GLES2DecoderImpl::DoBindVertexArrayOES(GLuint client_id) { "glBindVertexArrayOES", "bad vertex array id."); current_decoder_error_ = error::kNoError; return; - } else { - service_id = vao->service_id(); } } else { - vao = default_vertex_attrib_manager_.get(); + vao = state_.default_vertex_attrib_manager.get(); } // Only set the VAO state if it's changed @@ -9665,6 +9691,7 @@ void GLES2DecoderImpl::DoBindVertexArrayOES(GLuint client_id) { if (!features().native_vertex_array_object) { EmulateVertexArrayState(); } else { + GLuint service_id = vao->service_id(); glBindVertexArrayOES(service_id); } } diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h index 03a4b546f0..c573b23369 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder.h @@ -142,7 +142,6 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, virtual void RestoreAllTextureUnitBindings( const ContextState* prev_state) const = 0; virtual void RestoreActiveTextureUnitBinding(unsigned int target) const = 0; - virtual void RestoreAttribute(unsigned index) const = 0; virtual void RestoreBufferBindings() const = 0; virtual void RestoreFramebufferBindings() const = 0; virtual void RestoreGlobalState() const = 0; diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h index ff678c9428..8043514174 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h @@ -61,7 +61,6 @@ class MockGLES2Decoder : public GLES2Decoder { RestoreAllTextureUnitBindings, void(const ContextState* state)); MOCK_CONST_METHOD1( RestoreActiveTextureUnitBinding, void(unsigned int target)); - MOCK_CONST_METHOD1(RestoreAttribute, void(unsigned index)); MOCK_CONST_METHOD0(RestoreBufferBindings, void()); MOCK_CONST_METHOD0(RestoreFramebufferBindings, void()); MOCK_CONST_METHOD0(RestoreGlobalState, void()); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc index 016bfab76b..db9960925a 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc @@ -7066,15 +7066,29 @@ TEST_F(GLES2DecoderManualInitTest, BeginEndQueryEXT) { EXPECT_CALL(*gl_, BeginQueryARB(GL_ANY_SAMPLES_PASSED_EXT, kNewServiceId)) .Times(1) .RetiresOnSaturation(); + + // Query object should not be created untill BeginQueriesEXT. + QueryManager* query_manager = decoder_->GetQueryManager(); + ASSERT_TRUE(query_manager != NULL); + QueryManager::Query* query = query_manager->GetQuery(kNewClientId); + EXPECT_TRUE(query == NULL); + + // BeginQueryEXT should fail if id is not generated from GenQueriesEXT. + begin_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, + kInvalidClientId, + kSharedMemoryId, + kSharedMemoryOffset); + EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); + EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); + begin_cmd.Init( GL_ANY_SAMPLES_PASSED_EXT, kNewClientId, kSharedMemoryId, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - QueryManager* query_manager = decoder_->GetQueryManager(); - ASSERT_TRUE(query_manager != NULL); - QueryManager::Query* query = query_manager->GetQuery(kNewClientId); + // After BeginQueriesEXT id name should have query object associated with it. + query = query_manager->GetQuery(kNewClientId); ASSERT_TRUE(query != NULL); EXPECT_FALSE(query->pending()); @@ -7112,6 +7126,7 @@ const QueryType kQueryTypes[] = { { GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM, false }, { GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, false }, { GL_GET_ERROR_QUERY_CHROMIUM, false }, + { GL_COMMANDS_COMPLETED_CHROMIUM, false }, { GL_ANY_SAMPLES_PASSED_EXT, true }, }; @@ -7125,7 +7140,7 @@ static void CheckBeginEndQueryBadMemoryFails( // We need to reset the decoder on each iteration, because we lose the // context every time. GLES2DecoderTestBase::InitState init; - init.extensions = "GL_EXT_occlusion_query_boolean"; + init.extensions = "GL_EXT_occlusion_query_boolean GL_ARB_sync"; init.gl_version = "opengl es 2.0"; init.has_alpha = true; init.request_alpha = true; @@ -7160,6 +7175,13 @@ static void CheckBeginEndQueryBadMemoryFails( .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); } + GLsync kGlSync = reinterpret_cast<GLsync>(0xdeadbeef); + if (query_type.type == GL_COMMANDS_COMPLETED_CHROMIUM) { + EXPECT_CALL(*gl, Flush()).RetiresOnSaturation(); + EXPECT_CALL(*gl, FenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0)) + .WillOnce(Return(kGlSync)) + .RetiresOnSaturation(); + } EndQueryEXT end_cmd; end_cmd.Init(query_type.type, 1); @@ -7175,6 +7197,11 @@ static void CheckBeginEndQueryBadMemoryFails( .WillOnce(SetArgumentPointee<2>(1)) .RetiresOnSaturation(); } + if (query_type.type == GL_COMMANDS_COMPLETED_CHROMIUM) { + EXPECT_CALL(*gl, ClientWaitSync(kGlSync, _, _)) + .WillOnce(Return(GL_ALREADY_SIGNALED)) + .RetiresOnSaturation(); + } QueryManager* query_manager = test->GetDecoder()->GetQueryManager(); ASSERT_TRUE(query_manager != NULL); @@ -7189,6 +7216,8 @@ static void CheckBeginEndQueryBadMemoryFails( .Times(1) .RetiresOnSaturation(); } + if (query_type.type == GL_COMMANDS_COMPLETED_CHROMIUM) + EXPECT_CALL(*gl, DeleteSync(kGlSync)).Times(1).RetiresOnSaturation(); test->ResetDecoder(); } @@ -7276,6 +7305,65 @@ TEST_F(GLES2DecoderTest, BeginEndQueryEXTGetErrorQueryCHROMIUM) { static_cast<GLenum>(sync->result)); } +TEST_F(GLES2DecoderManualInitTest, BeginEndQueryEXTCommandsCompletedCHROMIUM) { + InitState init; + init.extensions = "GL_EXT_occlusion_query_boolean GL_ARB_sync"; + init.gl_version = "opengl es 2.0"; + init.has_alpha = true; + init.request_alpha = true; + init.bind_generates_resource = true; + InitDecoder(init); + + GenHelper<GenQueriesEXTImmediate>(kNewClientId); + + BeginQueryEXT begin_cmd; + begin_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, + kNewClientId, + kSharedMemoryId, + kSharedMemoryOffset); + EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); + EXPECT_EQ(GL_NO_ERROR, GetGLError()); + + QueryManager* query_manager = decoder_->GetQueryManager(); + ASSERT_TRUE(query_manager != NULL); + QueryManager::Query* query = query_manager->GetQuery(kNewClientId); + ASSERT_TRUE(query != NULL); + EXPECT_FALSE(query->pending()); + + GLsync kGlSync = reinterpret_cast<GLsync>(0xdeadbeef); + EXPECT_CALL(*gl_, Flush()).RetiresOnSaturation(); + EXPECT_CALL(*gl_, FenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0)) + .WillOnce(Return(kGlSync)) + .RetiresOnSaturation(); + + EndQueryEXT end_cmd; + end_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, 1); + EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); + EXPECT_EQ(GL_NO_ERROR, GetGLError()); + EXPECT_TRUE(query->pending()); + + EXPECT_CALL(*gl_, ClientWaitSync(kGlSync, _, _)) + .WillOnce(Return(GL_TIMEOUT_EXPIRED)) + .RetiresOnSaturation(); + bool process_success = query_manager->ProcessPendingQueries(); + + EXPECT_TRUE(process_success); + EXPECT_TRUE(query->pending()); + + EXPECT_CALL(*gl_, ClientWaitSync(kGlSync, _, _)) + .WillOnce(Return(GL_ALREADY_SIGNALED)) + .RetiresOnSaturation(); + process_success = query_manager->ProcessPendingQueries(); + + EXPECT_TRUE(process_success); + EXPECT_FALSE(query->pending()); + QuerySync* sync = static_cast<QuerySync*>(shared_memory_address_); + EXPECT_EQ(static_cast<GLenum>(0), static_cast<GLenum>(sync->result)); + + EXPECT_CALL(*gl_, DeleteSync(kGlSync)).Times(1).RetiresOnSaturation(); + ResetDecoder(); +} + TEST_F(GLES2DecoderTest, ProduceAndConsumeTextureCHROMIUM) { Mailbox mailbox = Mailbox::Generate(); @@ -7706,6 +7794,20 @@ class GLES2DecoderVertexArraysOESTest : public GLES2DecoderWithShaderTest { ExecuteImmediateCmd(cmd, sizeof(temp))); } + void DeleteBoundVertexArraysOESImmediateValidArgs() { + BindVertexArrayOESValidArgs(); + + AddExpectationsForDeleteBoundVertexArraysOES(); + DeleteVertexArraysOESImmediate& cmd = + *GetImmediateAs<DeleteVertexArraysOESImmediate>(); + cmd.Init(1, &client_vertexarray_id_); + EXPECT_EQ(error::kNoError, + ExecuteImmediateCmd(cmd, sizeof(client_vertexarray_id_))); + EXPECT_EQ(GL_NO_ERROR, GetGLError()); + EXPECT_TRUE(GetVertexArrayInfo(client_vertexarray_id_) == NULL); + vertex_array_deleted_manually_ = true; + } + void IsVertexArrayOESValidArgs() { IsVertexArrayOES cmd; cmd.Init(client_vertexarray_id_, shared_memory_id_, shared_memory_offset_); @@ -7824,6 +7926,15 @@ TEST_F(GLES2DecoderEmulatedVertexArraysOESTest, DeleteVertexArraysOESImmediateInvalidArgs(); } +TEST_F(GLES2DecoderVertexArraysOESTest, + DeleteBoundVertexArraysOESImmediateValidArgs) { + DeleteBoundVertexArraysOESImmediateValidArgs(); +} +TEST_F(GLES2DecoderEmulatedVertexArraysOESTest, + DeleteBoundVertexArraysOESImmediateValidArgs) { + DeleteBoundVertexArraysOESImmediateValidArgs(); +} + TEST_F(GLES2DecoderVertexArraysOESTest, IsVertexArrayOESValidArgs) { IsVertexArrayOESValidArgs(); } @@ -8278,6 +8389,7 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransfers) { // AsyncTexImage2D { // Create transfer state since it doesn't exist. + EXPECT_EQ(texture_ref->num_observers(), 0); EXPECT_CALL(*manager, CreatePixelTransferDelegateImpl(texture_ref, _)) .WillOnce(Return( delegate = new StrictMock<gpu::MockAsyncPixelTransferDelegate>)) @@ -8297,6 +8409,7 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransfers) { EXPECT_TRUE(texture->SafeToRenderFrom()); GLsizei width, height; EXPECT_FALSE(texture->GetLevelSize(GL_TEXTURE_2D, 0, &width, &height)); + EXPECT_EQ(texture_ref->num_observers(), 1); } { // Async redefinitions are not allowed! @@ -8330,8 +8443,10 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransfers) { } // AsyncTexSubImage2D + EXPECT_CALL(*delegate, Destroy()).RetiresOnSaturation(); decoder_->GetAsyncPixelTransferManager() ->ClearPixelTransferDelegateForTest(texture_ref); + EXPECT_EQ(texture_ref->num_observers(), 0); texture->SetImmutable(false); { // Create transfer state since it doesn't exist. @@ -8387,6 +8502,7 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransfers) { // Delete delegate on DeleteTexture. { + EXPECT_EQ(texture_ref->num_observers(), 1); EXPECT_CALL(*delegate, Destroy()).RetiresOnSaturation(); DoDeleteTexture(client_texture_id_, kServiceTextureId); EXPECT_FALSE( @@ -8470,6 +8586,11 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransfers) { EXPECT_EQ(error::kNoError, ExecuteCmd(wait_all_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } + + // Remove PixelTransferManager before the decoder destroys. + EXPECT_CALL(*delegate, Destroy()).RetiresOnSaturation(); + decoder_->ResetAsyncPixelTransferManagerForTest(); + manager = NULL; } TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransferManager) { @@ -8520,11 +8641,14 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransferManager) { // Delete delegate on manager teardown. { + EXPECT_EQ(texture_ref->num_observers(), 1); EXPECT_CALL(*delegate, Destroy()).RetiresOnSaturation(); decoder_->ResetAsyncPixelTransferManagerForTest(); + manager = NULL; // Texture ref still valid. EXPECT_EQ(texture_ref, GetTexture(client_texture_id_)); + EXPECT_EQ(texture_ref->num_observers(), 0); } } @@ -9144,6 +9268,20 @@ TEST_F(GLES2DecoderRestoreStateTest, DefaultUnit1) { GetDecoder()->RestoreAllTextureUnitBindings(&prev_state); } +// TODO(vmiura): Tests for VAO restore. + +// TODO(vmiura): Tests for ContextState::RestoreAttribute(). + +// TODO(vmiura): Tests for ContextState::RestoreBufferBindings(). + +// TODO(vmiura): Tests for ContextState::RestoreProgramBindings(). + +// TODO(vmiura): Tests for RestoreRenderbufferBindings(). + +// TODO(vmiura): Tests for RestoreProgramBindings(). + +// TODO(vmiura): Tests for RestoreGlobalState(). + TEST_F(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc index eb4eb9c593..b1ed1dfaf3 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc @@ -146,6 +146,11 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine( EXPECT_TRUE( group_->Initialize(mock_decoder_.get(), DisallowedFeatures())); + if (group_->feature_info()->feature_flags().native_vertex_array_object) { + EXPECT_CALL(*gl_, GenVertexArraysOES(1, _)).Times(1).RetiresOnSaturation(); + EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation(); + } + if (group_->feature_info()->workarounds().init_vertex_attributes) AddExpectationsForVertexAttribManager(); @@ -987,6 +992,12 @@ void GLES2DecoderTestBase::AddExpectationsForDeleteVertexArraysOES(){ } } +void GLES2DecoderTestBase::AddExpectationsForDeleteBoundVertexArraysOES() { + // Expectations are the same as a delete, followed by binding VAO 0. + AddExpectationsForDeleteVertexArraysOES(); + AddExpectationsForBindVertexArrayOES(); +} + void GLES2DecoderTestBase::AddExpectationsForBindVertexArrayOES() { if (group_->feature_info()->feature_flags().native_vertex_array_object) { EXPECT_CALL(*gl_, BindVertexArrayOES(_)) diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h index 24a960e440..52e7211e42 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h @@ -354,6 +354,7 @@ class GLES2DecoderTestBase : public testing::Test { void AddExpectationsForGenVertexArraysOES(); void AddExpectationsForDeleteVertexArraysOES(); + void AddExpectationsForDeleteBoundVertexArraysOES(); void AddExpectationsForBindVertexArrayOES(); void AddExpectationsForRestoreAttribState(GLuint attrib); diff --git a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h index ca49ced6f8..d296018a0d 100644 --- a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h @@ -214,7 +214,8 @@ static const GLenum valid_query_target_table[] = { GL_COMMANDS_ISSUED_CHROMIUM, GL_LATENCY_QUERY_CHROMIUM, GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM, - GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, }; + GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM, + GL_COMMANDS_COMPLETED_CHROMIUM, }; static const GLenum valid_read_pixel_format_table[] = {GL_ALPHA, GL_RGB, GL_RGBA, }; diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc index 9f1d3a7169..ffb54cca51 100644 --- a/gpu/command_buffer/service/query_manager.cc +++ b/gpu/command_buffer/service/query_manager.cc @@ -16,6 +16,7 @@ #include "gpu/command_buffer/service/error_state.h" #include "gpu/command_buffer/service/feature_info.h" #include "gpu/command_buffer/service/gles2_cmd_decoder.h" +#include "ui/gl/gl_fence.h" namespace gpu { namespace gles2 { @@ -389,6 +390,55 @@ void GetErrorQuery::Destroy(bool /* have_context */) { GetErrorQuery::~GetErrorQuery() { } +class CommandsCompletedQuery : public QueryManager::Query { + public: + CommandsCompletedQuery(QueryManager* manager, + GLenum target, + int32 shm_id, + uint32 shm_offset); + + // Overridden from QueryManager::Query: + virtual bool Begin() OVERRIDE; + virtual bool End(base::subtle::Atomic32 submit_count) OVERRIDE; + virtual bool Process() OVERRIDE; + virtual void Destroy(bool have_context) OVERRIDE; + + protected: + virtual ~CommandsCompletedQuery(); + + private: + scoped_ptr<gfx::GLFence> fence_; +}; + +CommandsCompletedQuery::CommandsCompletedQuery(QueryManager* manager, + GLenum target, + int32 shm_id, + uint32 shm_offset) + : Query(manager, target, shm_id, shm_offset) {} + +bool CommandsCompletedQuery::Begin() { return true; } + +bool CommandsCompletedQuery::End(base::subtle::Atomic32 submit_count) { + fence_.reset(gfx::GLFence::Create()); + DCHECK(fence_); + return AddToPendingQueue(submit_count); +} + +bool CommandsCompletedQuery::Process() { + if (fence_ && !fence_->HasCompleted()) + return true; + return MarkAsCompleted(0); +} + +void CommandsCompletedQuery::Destroy(bool have_context) { + if (have_context && !IsDeleted()) { + fence_.reset(); + MarkAsDeleted(); + } +} + +CommandsCompletedQuery::~CommandsCompletedQuery() {} + QueryManager::QueryManager( GLES2Decoder* decoder, FeatureInfo* feature_info) @@ -444,6 +494,9 @@ QueryManager::Query* QueryManager::CreateQuery( case GL_GET_ERROR_QUERY_CHROMIUM: query = new GetErrorQuery(this, target, shm_id, shm_offset); break; + case GL_COMMANDS_COMPLETED_CHROMIUM: + query = new CommandsCompletedQuery(this, target, shm_id, shm_offset); + break; default: { GLuint service_id = 0; glGenQueriesARB(1, &service_id); @@ -459,6 +512,18 @@ QueryManager::Query* QueryManager::CreateQuery( return query.get(); } +void QueryManager::GenQueries(GLsizei n, const GLuint* queries) { + DCHECK_GE(n, 0); + for (GLsizei i = 0; i < n; ++i) { + generated_query_ids_.insert(queries[i]); + } +} + +bool QueryManager::IsValidQuery(GLuint id) { + GeneratedQueryIds::iterator it = generated_query_ids_.find(id); + return it != generated_query_ids_.end(); +} + QueryManager::Query* QueryManager::GetQuery( GLuint client_id) { QueryMap::iterator it = queries_.find(client_id); @@ -473,6 +538,7 @@ void QueryManager::RemoveQuery(GLuint client_id) { query->MarkAsDeleted(); queries_.erase(it); } + generated_query_ids_.erase(client_id); } void QueryManager::StartTracking(QueryManager::Query* /* query */) { diff --git a/gpu/command_buffer/service/query_manager.h b/gpu/command_buffer/service/query_manager.h index cbc7931ad1..36d424cefb 100644 --- a/gpu/command_buffer/service/query_manager.h +++ b/gpu/command_buffer/service/query_manager.h @@ -188,6 +188,9 @@ class GPU_EXPORT QueryManager { return decoder_; } + void GenQueries(GLsizei n, const GLuint* queries); + bool IsValidQuery(GLuint id); + private: void StartTracking(Query* query); void StopTracking(Query* query); @@ -228,6 +231,9 @@ class GPU_EXPORT QueryManager { typedef base::hash_map<GLuint, scoped_refptr<Query> > QueryMap; QueryMap queries_; + typedef base::hash_set<GLuint> GeneratedQueryIds; + GeneratedQueryIds generated_query_ids_; + // Queries waiting for completion. typedef std::deque<scoped_refptr<Query> > QueryQueue; QueryQueue pending_queries_; diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc index 53157de8ed..c3279e25ec 100644 --- a/gpu/command_buffer/service/shader_translator.cc +++ b/gpu/command_buffer/service/shader_translator.cc @@ -204,7 +204,9 @@ bool ShaderTranslator::Translate(const char* shader) { std::string ShaderTranslator::GetStringForOptionsThatWouldEffectCompilation() const { -#if ANGLE_SH_VERSION >= 122 +#if ANGLE_SH_VERSION >= 123 + const size_t kNumIntFields = 21; +#elif ANGLE_SH_VERSION >= 122 const size_t kNumIntFields = 20; #else const size_t kNumIntFields = 16; @@ -261,6 +263,10 @@ std::string ShaderTranslator::GetStringForOptionsThatWouldEffectCompilation() ":EXT_frag_depth:" + #if ANGLE_SH_VERSION >= 122 base::IntToString(compiler_options_.EXT_frag_depth) + +#if ANGLE_SH_VERSION >= 123 + ":EXT_shader_texture_lod:" + + base::IntToString(compiler_options_.EXT_shader_texture_lod) + +#endif ":MaxVertexOutputVectors:" + base::IntToString(compiler_options_.MaxVertexOutputVectors) + ":MaxFragmentInputVectors:" + @@ -269,7 +275,7 @@ std::string ShaderTranslator::GetStringForOptionsThatWouldEffectCompilation() base::IntToString(compiler_options_.MinProgramTexelOffset) + ":MaxProgramTexelOffset:" + base::IntToString(compiler_options_.MaxProgramTexelOffset)); -#else +#else // ANGLE_SH_VERSION < 122 base::IntToString(compiler_options_.EXT_frag_depth)); #endif } diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc index 9b31dac460..24382f0da3 100644 --- a/gpu/command_buffer/service/texture_definition.cc +++ b/gpu/command_buffer/service/texture_definition.cc @@ -101,7 +101,9 @@ class NativeImageBufferEGL : public NativeImageBuffer { static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); private: - explicit NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image); + NativeImageBufferEGL(scoped_ptr<gfx::GLFence> write_fence, + EGLDisplay display, + EGLImageKHR image); virtual ~NativeImageBufferEGL(); virtual void BindToTexture(GLenum target) OVERRIDE; @@ -136,12 +138,16 @@ scoped_refptr<NativeImageBufferEGL> NativeImageBufferEGL::Create( if (egl_image == EGL_NO_IMAGE_KHR) return NULL; - return new NativeImageBufferEGL(egl_display, egl_image); + return new NativeImageBufferEGL( + make_scoped_ptr(gfx::GLFence::Create()), egl_display, egl_image); } -NativeImageBufferEGL::NativeImageBufferEGL(EGLDisplay display, +NativeImageBufferEGL::NativeImageBufferEGL(scoped_ptr<gfx::GLFence> write_fence, + EGLDisplay display, EGLImageKHR image) - : egl_display_(display), egl_image_(image) { + : NativeImageBuffer(write_fence.Pass()), + egl_display_(display), + egl_image_(image) { DCHECK(egl_display_ != EGL_NO_DISPLAY); DCHECK(egl_image_ != EGL_NO_IMAGE_KHR); } @@ -161,7 +167,7 @@ void NativeImageBufferEGL::BindToTexture(GLenum target) { class NativeImageBufferStub : public NativeImageBuffer { public: - NativeImageBufferStub() {} + NativeImageBufferStub() : NativeImageBuffer(scoped_ptr<gfx::GLFence>()) {} private: virtual ~NativeImageBufferStub() {} @@ -192,8 +198,8 @@ NativeImageBuffer::ClientInfo::ClientInfo(gfx::GLImage* client) NativeImageBuffer::ClientInfo::~ClientInfo() {} -NativeImageBuffer::NativeImageBuffer() : write_client_(NULL) { - write_fence_.reset(gfx::GLFence::Create()); +NativeImageBuffer::NativeImageBuffer(scoped_ptr<gfx::GLFence> write_fence) + : write_fence_(write_fence.Pass()), write_client_(NULL) { } NativeImageBuffer::~NativeImageBuffer() { diff --git a/gpu/command_buffer/service/texture_definition.h b/gpu/command_buffer/service/texture_definition.h index 27ae6a37ea..7708902fab 100644 --- a/gpu/command_buffer/service/texture_definition.h +++ b/gpu/command_buffer/service/texture_definition.h @@ -42,7 +42,7 @@ class NativeImageBuffer : public base::RefCountedThreadSafe<NativeImageBuffer> { protected: friend class base::RefCountedThreadSafe<NativeImageBuffer>; - NativeImageBuffer(); + explicit NativeImageBuffer(scoped_ptr<gfx::GLFence> write_fence); virtual ~NativeImageBuffer(); base::Lock lock_; diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc index 8f7703b954..c3a824c372 100644 --- a/gpu/command_buffer/service/texture_manager.cc +++ b/gpu/command_buffer/service/texture_manager.cc @@ -66,9 +66,8 @@ TextureManager::DestructionObserver::DestructionObserver() {} TextureManager::DestructionObserver::~DestructionObserver() {} TextureManager::~TextureManager() { - FOR_EACH_OBSERVER(DestructionObserver, - destruction_observers_, - OnTextureManagerDestroying(this)); + for (unsigned int i = 0; i < destruction_observers_.size(); i++) + destruction_observers_[i]->OnTextureManagerDestroying(this); DCHECK(textures_.empty()); @@ -873,7 +872,8 @@ TextureRef::TextureRef(TextureManager* manager, Texture* texture) : manager_(manager), texture_(texture), - client_id_(client_id) { + client_id_(client_id), + num_observers_(0) { DCHECK(manager_); DCHECK(texture_); texture_->AddTextureRef(this); @@ -1222,9 +1222,12 @@ void TextureManager::StartTracking(TextureRef* ref) { } void TextureManager::StopTracking(TextureRef* ref) { - FOR_EACH_OBSERVER(DestructionObserver, - destruction_observers_, - OnTextureRefDestroying(ref)); + if (ref->num_observers()) { + for (unsigned int i = 0; i < destruction_observers_.size(); i++) { + destruction_observers_[i]->OnTextureRefDestroying(ref); + } + DCHECK_EQ(ref->num_observers(), 0); + } Texture* texture = ref->texture(); diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h index 8513264413..6b3a32ebf3 100644 --- a/gpu/command_buffer/service/texture_manager.h +++ b/gpu/command_buffer/service/texture_manager.h @@ -13,7 +13,6 @@ #include "base/containers/hash_tables.h" #include "base/logging.h" #include "base/memory/ref_counted.h" -#include "base/observer_list.h" #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h" #include "gpu/command_buffer/service/gl_utils.h" #include "gpu/command_buffer/service/memory_tracking.h" @@ -404,10 +403,15 @@ class GPU_EXPORT TextureRef : public base::RefCounted<TextureRef> { static scoped_refptr<TextureRef> Create(TextureManager* manager, GLuint client_id, GLuint service_id); + + void AddObserver() { num_observers_++; } + void RemoveObserver() { num_observers_--; } + const Texture* texture() const { return texture_; } Texture* texture() { return texture_; } GLuint client_id() const { return client_id_; } GLuint service_id() const { return texture_->service_id(); } + GLint num_observers() const { return num_observers_; } private: friend class base::RefCounted<TextureRef>; @@ -422,6 +426,7 @@ class GPU_EXPORT TextureRef : public base::RefCounted<TextureRef> { TextureManager* manager_; Texture* texture_; GLuint client_id_; + GLint num_observers_; DISALLOW_COPY_AND_ASSIGN(TextureRef); }; @@ -682,11 +687,18 @@ class GPU_EXPORT TextureManager { std::string* signature) const; void AddObserver(DestructionObserver* observer) { - destruction_observers_.AddObserver(observer); + destruction_observers_.push_back(observer); } void RemoveObserver(DestructionObserver* observer) { - destruction_observers_.RemoveObserver(observer); + for (unsigned int i = 0; i < destruction_observers_.size(); i++) { + if (destruction_observers_[i] == observer) { + std::swap(destruction_observers_[i], destruction_observers_.back()); + destruction_observers_.pop_back(); + return; + } + } + NOTREACHED(); } struct DoTextImage2DArguments { @@ -796,7 +808,7 @@ class GPU_EXPORT TextureManager { // The default textures for each target (texture name = 0) scoped_refptr<TextureRef> default_textures_[kNumDefaultTextures]; - ObserverList<DestructionObserver> destruction_observers_; + std::vector<DestructionObserver*> destruction_observers_; DISALLOW_COPY_AND_ASSIGN(TextureManager); }; diff --git a/gpu/command_buffer/service/vertex_array_manager.cc b/gpu/command_buffer/service/vertex_array_manager.cc index 974751941c..1560c043c2 100644 --- a/gpu/command_buffer/service/vertex_array_manager.cc +++ b/gpu/command_buffer/service/vertex_array_manager.cc @@ -28,14 +28,22 @@ void VertexArrayManager::Destroy(bool have_context) { vertex_attrib_managers_.clear(); } -void VertexArrayManager::CreateVertexAttribManager( - GLuint client_id, GLuint service_id, uint32 num_vertex_attribs) { +scoped_refptr<VertexAttribManager> +VertexArrayManager::CreateVertexAttribManager(GLuint client_id, + GLuint service_id, + uint32 num_vertex_attribs, + bool client_visible) { scoped_refptr<VertexAttribManager> vertex_attrib_manager( new VertexAttribManager(this, service_id, num_vertex_attribs)); - std::pair<VertexAttribManagerMap::iterator, bool> result = - vertex_attrib_managers_.insert( - std::make_pair(client_id, vertex_attrib_manager)); - DCHECK(result.second); + + if (client_visible) { + std::pair<VertexAttribManagerMap::iterator, bool> result = + vertex_attrib_managers_.insert( + std::make_pair(client_id, vertex_attrib_manager)); + DCHECK(result.second); + } + + return vertex_attrib_manager; } VertexAttribManager* VertexArrayManager::GetVertexAttribManager( diff --git a/gpu/command_buffer/service/vertex_array_manager.h b/gpu/command_buffer/service/vertex_array_manager.h index 4fc567c7b7..97ecc1a535 100644 --- a/gpu/command_buffer/service/vertex_array_manager.h +++ b/gpu/command_buffer/service/vertex_array_manager.h @@ -28,9 +28,13 @@ class GPU_EXPORT VertexArrayManager { // Must call before destruction. void Destroy(bool have_context); - // Creates a VertexArrayInfo for the given vertex array. - void CreateVertexAttribManager(GLuint client_id, GLuint service_id, - uint32 num_vertex_attribs); + // Creates a VertexAttribManager and if client_visible, + // maps it to the client_id. + scoped_refptr<VertexAttribManager> CreateVertexAttribManager( + GLuint client_id, + GLuint service_id, + uint32 num_vertex_attribs, + bool client_visible); // Gets the vertex attrib manager for the given vertex array. VertexAttribManager* GetVertexAttribManager(GLuint client_id); diff --git a/gpu/command_buffer/service/vertex_array_manager_unittest.cc b/gpu/command_buffer/service/vertex_array_manager_unittest.cc index 3e3fd89b5e..617a5f60af 100644 --- a/gpu/command_buffer/service/vertex_array_manager_unittest.cc +++ b/gpu/command_buffer/service/vertex_array_manager_unittest.cc @@ -58,7 +58,7 @@ TEST_F(VertexArrayManagerTest, Basic) { // Check we can create manager_->CreateVertexAttribManager( - kClient1Id, kService1Id, kNumVertexAttribs); + kClient1Id, kService1Id, kNumVertexAttribs, true); // Check creation success VertexAttribManager* info1 = manager_->GetVertexAttribManager(kClient1Id); ASSERT_TRUE(info1 != NULL); @@ -84,7 +84,8 @@ TEST_F(VertexArrayManagerTest, Destroy) { const GLuint kService1Id = 11; VertexArrayManager manager; // Check we can create - manager.CreateVertexAttribManager(kClient1Id, kService1Id, kNumVertexAttribs); + manager.CreateVertexAttribManager( + kClient1Id, kService1Id, kNumVertexAttribs, true); // Check creation success VertexAttribManager* info1 = manager.GetVertexAttribManager(kClient1Id); ASSERT_TRUE(info1 != NULL); diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc index 473ac6f6d0..3211a35e02 100644 --- a/gpu/command_buffer/tests/gl_manager.cc +++ b/gpu/command_buffer/tests/gl_manager.cc @@ -142,15 +142,15 @@ void GLManager::Initialize(const GLManager::Options& options) { surface_ = gfx::GLSurface::CreateOffscreenGLSurface(options.size); ASSERT_TRUE(surface_.get() != NULL) << "could not create offscreen surface"; - if (real_gl_context) { + if (base_context_) { context_ = scoped_refptr<gfx::GLContext>(new gpu::GLContextVirtual( - share_group_.get(), real_gl_context, decoder_->AsWeakPtr())); + share_group_.get(), base_context_->get(), decoder_->AsWeakPtr())); ASSERT_TRUE(context_->Initialize( surface_.get(), gfx::PreferIntegratedGpu)); } else { - if (base_context_) { + if (real_gl_context) { context_ = scoped_refptr<gfx::GLContext>(new gpu::GLContextVirtual( - share_group_.get(), base_context_->get(), decoder_->AsWeakPtr())); + share_group_.get(), real_gl_context, decoder_->AsWeakPtr())); ASSERT_TRUE(context_->Initialize( surface_.get(), gfx::PreferIntegratedGpu)); } else { diff --git a/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc b/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc index 1776ff12fa..17cfa9f3d9 100644 --- a/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc +++ b/gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc @@ -21,6 +21,11 @@ class GLVirtualContextsTest : public testing::Test { static const int kSize1 = 8; static const int kSize2 = 16; + static const GLfloat kFloatRed[4]; + static const GLfloat kFloatGreen[4]; + static const uint8 kExpectedRed[4]; + static const uint8 kExpectedGreen[4]; + virtual void SetUp() { GLManager::Options options; options.size = gfx::Size(kSize0, kSize0); @@ -40,15 +45,61 @@ class GLVirtualContextsTest : public testing::Test { gl_real_.Destroy(); } + GLuint SetupColoredVertexProgram() { + static const char* v_shader_str = SHADER( + attribute vec4 a_position; + attribute vec4 a_color; + varying vec4 v_color; + void main() + { + gl_Position = a_position; + v_color = a_color; + } + ); + + static const char* f_shader_str = SHADER( + precision mediump float; + varying vec4 v_color; + void main() + { + gl_FragColor = v_color; + } + ); + + GLuint program = GLTestHelper::LoadProgram(v_shader_str, f_shader_str); + glUseProgram(program); + return program; + } + + void SetUpColoredUnitQuad(const GLfloat* color) { + GLuint program1 = SetupColoredVertexProgram(); + GLuint position_loc1 = glGetAttribLocation(program1, "a_position"); + GLuint color_loc1 = glGetAttribLocation(program1, "a_color"); + GLTestHelper::SetupUnitQuad(position_loc1); + GLTestHelper::SetupColorsForUnitQuad(color_loc1, color, GL_STATIC_DRAW); + } + GLManager gl_real_; GLManager gl_real_shared_; GLManager gl1_; GLManager gl2_; }; +const GLfloat GLVirtualContextsTest::kFloatRed[4] = { + 1.0f, 0.0f, 0.0f, 1.0f, +}; +const GLfloat GLVirtualContextsTest::kFloatGreen[4] = { + 0.0f, 1.0f, 0.0f, 1.0f, +}; +const uint8 GLVirtualContextsTest::kExpectedRed[4] = { + 255, 0, 0, 255, +}; +const uint8 GLVirtualContextsTest::kExpectedGreen[4] = { + 0, 255, 0, 255, +}; + namespace { -#if !defined(OS_ANDROID) void SetupSimpleShader(const uint8* color) { static const char* v_shader_str = SHADER( attribute vec4 a_Position; @@ -91,12 +142,9 @@ void TestDraw(int size) { glDrawArrays(GL_TRIANGLES, 0, 6); } -#endif // !defined(OS_ANDROID) - } // anonymous namespace // http://crbug.com/281565 -#if !defined(OS_ANDROID) TEST_F(GLVirtualContextsTest, Basic) { struct TestInfo { int size; @@ -139,7 +187,118 @@ TEST_F(GLVirtualContextsTest, Basic) { GLTestHelper::CheckGLError("no errors", __LINE__); } } -#endif + +// http://crbug.com/363407 +TEST_F(GLVirtualContextsTest, VertexArrayObjectRestore) { + GLuint vao1 = 0, vao2 = 0; + + gl1_.MakeCurrent(); + // Set up red quad in vao1. + glGenVertexArraysOES(1, &vao1); + glBindVertexArrayOES(vao1); + SetUpColoredUnitQuad(kFloatRed); + glFinish(); + + gl2_.MakeCurrent(); + // Set up green quad in vao2. + glGenVertexArraysOES(1, &vao2); + glBindVertexArrayOES(vao2); + SetUpColoredUnitQuad(kFloatGreen); + glFinish(); + + gl1_.MakeCurrent(); + // Test to ensure that vao1 is still the active VAO for this context. + glDrawArrays(GL_TRIANGLES, 0, 6); + EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, kSize1, kSize1, 0, kExpectedRed)); + glFinish(); + GLTestHelper::CheckGLError("no errors", __LINE__); + + gl2_.MakeCurrent(); + // Test to ensure that vao2 is still the active VAO for this context. + glDrawArrays(GL_TRIANGLES, 0, 6); + EXPECT_TRUE( + GLTestHelper::CheckPixels(0, 0, kSize2, kSize2, 0, kExpectedGreen)); + glFinish(); + GLTestHelper::CheckGLError("no errors", __LINE__); +} + +// http://crbug.com/363407 +TEST_F(GLVirtualContextsTest, VertexArrayObjectRestoreRebind) { + GLuint vao1 = 0, vao2 = 0; + + gl1_.MakeCurrent(); + // Set up red quad in vao1. + glGenVertexArraysOES(1, &vao1); + glBindVertexArrayOES(vao1); + SetUpColoredUnitQuad(kFloatRed); + glFinish(); + + gl2_.MakeCurrent(); + // Set up green quad in new vao2. + glGenVertexArraysOES(1, &vao2); + glBindVertexArrayOES(vao2); + SetUpColoredUnitQuad(kFloatGreen); + glFinish(); + + gl1_.MakeCurrent(); + // Test to ensure that vao1 hasn't been corrupted after rebinding. + // Bind 0 is required so that bind vao1 is not optimized away in the service. + glBindVertexArrayOES(0); + glBindVertexArrayOES(vao1); + glDrawArrays(GL_TRIANGLES, 0, 6); + EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, kSize1, kSize1, 0, kExpectedRed)); + glFinish(); + GLTestHelper::CheckGLError("no errors", __LINE__); + + gl2_.MakeCurrent(); + // Test to ensure that vao1 hasn't been corrupted after rebinding. + // Bind 0 is required so that bind vao2 is not optimized away in the service. + glBindVertexArrayOES(0); + glBindVertexArrayOES(vao2); + glDrawArrays(GL_TRIANGLES, 0, 6); + EXPECT_TRUE( + GLTestHelper::CheckPixels(0, 0, kSize2, kSize2, 0, kExpectedGreen)); + glFinish(); + + GLTestHelper::CheckGLError("no errors", __LINE__); +} + +// http://crbug.com/363407 +TEST_F(GLVirtualContextsTest, VertexArrayObjectRestoreDefault) { + gl1_.MakeCurrent(); + // Set up red quad in default VAO. + SetUpColoredUnitQuad(kFloatRed); + glFinish(); + + gl2_.MakeCurrent(); + // Set up green quad in default VAO. + SetUpColoredUnitQuad(kFloatGreen); + glFinish(); + + // Gen & bind a non-default VAO. + GLuint vao; + glGenVertexArraysOES(1, &vao); + glBindVertexArrayOES(vao); + glFinish(); + + gl1_.MakeCurrent(); + // Test to ensure that default VAO on gl1_ is still valid. + glDrawArrays(GL_TRIANGLES, 0, 6); + EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, kSize1, kSize1, 0, kExpectedRed)); + glFinish(); + + gl2_.MakeCurrent(); + // Test to ensure that default VAO on gl2_ is still valid. + // This tests that a default VAO is restored even when it's not currently + // bound during the context switch. + glBindVertexArrayOES(0); + glDrawArrays(GL_TRIANGLES, 0, 6); + EXPECT_TRUE( + GLTestHelper::CheckPixels(0, 0, kSize2, kSize2, 0, kExpectedGreen)); + glFinish(); + + GLTestHelper::CheckGLError("no errors", __LINE__); +} } // namespace gpu diff --git a/gpu/command_buffer_client.target.darwin-arm.mk b/gpu/command_buffer_client.target.darwin-arm.mk index 27f2b438b9..86df9b6b28 100644 --- a/gpu/command_buffer_client.target.darwin-arm.mk +++ b/gpu/command_buffer_client.target.darwin-arm.mk @@ -228,7 +228,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_client.target.darwin-mips.mk b/gpu/command_buffer_client.target.darwin-mips.mk index 2539584f2b..b2262bd979 100644 --- a/gpu/command_buffer_client.target.darwin-mips.mk +++ b/gpu/command_buffer_client.target.darwin-mips.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_client.target.darwin-x86.mk b/gpu/command_buffer_client.target.darwin-x86.mk index c231a666f9..499d47ad73 100644 --- a/gpu/command_buffer_client.target.darwin-x86.mk +++ b/gpu/command_buffer_client.target.darwin-x86.mk @@ -226,7 +226,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_client.target.darwin-x86_64.mk b/gpu/command_buffer_client.target.darwin-x86_64.mk index 7889deb1e4..b3ff4f28ad 100644 --- a/gpu/command_buffer_client.target.darwin-x86_64.mk +++ b/gpu/command_buffer_client.target.darwin-x86_64.mk @@ -226,7 +226,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_client.target.linux-arm.mk b/gpu/command_buffer_client.target.linux-arm.mk index 27f2b438b9..86df9b6b28 100644 --- a/gpu/command_buffer_client.target.linux-arm.mk +++ b/gpu/command_buffer_client.target.linux-arm.mk @@ -228,7 +228,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_client.target.linux-mips.mk b/gpu/command_buffer_client.target.linux-mips.mk index 2539584f2b..b2262bd979 100644 --- a/gpu/command_buffer_client.target.linux-mips.mk +++ b/gpu/command_buffer_client.target.linux-mips.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_client.target.linux-x86.mk b/gpu/command_buffer_client.target.linux-x86.mk index c231a666f9..499d47ad73 100644 --- a/gpu/command_buffer_client.target.linux-x86.mk +++ b/gpu/command_buffer_client.target.linux-x86.mk @@ -226,7 +226,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_client.target.linux-x86_64.mk b/gpu/command_buffer_client.target.linux-x86_64.mk index 7889deb1e4..b3ff4f28ad 100644 --- a/gpu/command_buffer_client.target.linux-x86_64.mk +++ b/gpu/command_buffer_client.target.linux-x86_64.mk @@ -226,7 +226,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.darwin-arm.mk b/gpu/command_buffer_common.target.darwin-arm.mk index 24db8c4c2b..bcdc1548ee 100644 --- a/gpu/command_buffer_common.target.darwin-arm.mk +++ b/gpu/command_buffer_common.target.darwin-arm.mk @@ -231,7 +231,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.darwin-mips.mk b/gpu/command_buffer_common.target.darwin-mips.mk index 0712582b59..9954fdde12 100644 --- a/gpu/command_buffer_common.target.darwin-mips.mk +++ b/gpu/command_buffer_common.target.darwin-mips.mk @@ -227,7 +227,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.darwin-x86.mk b/gpu/command_buffer_common.target.darwin-x86.mk index 5b92ce2b9c..59a3a3909d 100644 --- a/gpu/command_buffer_common.target.darwin-x86.mk +++ b/gpu/command_buffer_common.target.darwin-x86.mk @@ -229,7 +229,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.darwin-x86_64.mk b/gpu/command_buffer_common.target.darwin-x86_64.mk index a0af3b57d2..f29656809e 100644 --- a/gpu/command_buffer_common.target.darwin-x86_64.mk +++ b/gpu/command_buffer_common.target.darwin-x86_64.mk @@ -229,7 +229,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.linux-arm.mk b/gpu/command_buffer_common.target.linux-arm.mk index 24db8c4c2b..bcdc1548ee 100644 --- a/gpu/command_buffer_common.target.linux-arm.mk +++ b/gpu/command_buffer_common.target.linux-arm.mk @@ -231,7 +231,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.linux-mips.mk b/gpu/command_buffer_common.target.linux-mips.mk index 0712582b59..9954fdde12 100644 --- a/gpu/command_buffer_common.target.linux-mips.mk +++ b/gpu/command_buffer_common.target.linux-mips.mk @@ -227,7 +227,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.linux-x86.mk b/gpu/command_buffer_common.target.linux-x86.mk index 5b92ce2b9c..59a3a3909d 100644 --- a/gpu/command_buffer_common.target.linux-x86.mk +++ b/gpu/command_buffer_common.target.linux-x86.mk @@ -229,7 +229,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_common.target.linux-x86_64.mk b/gpu/command_buffer_common.target.linux-x86_64.mk index a0af3b57d2..f29656809e 100644 --- a/gpu/command_buffer_common.target.linux-x86_64.mk +++ b/gpu/command_buffer_common.target.linux-x86_64.mk @@ -229,7 +229,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.gypi b/gpu/command_buffer_service.gypi index cd4662d0fe..5dd3962e49 100644 --- a/gpu/command_buffer_service.gypi +++ b/gpu/command_buffer_service.gypi @@ -131,11 +131,6 @@ 'command_buffer/service/vertex_attrib_manager.cc', ], 'conditions': [ - ['toolkit_uses_gtk == 1', { - 'dependencies': [ - '../build/linux/system.gyp:gtk', - ], - }], ['ui_compositor_image_transport==1', { 'include_dirs': [ '../third_party/khronos', diff --git a/gpu/command_buffer_service.target.darwin-arm.mk b/gpu/command_buffer_service.target.darwin-arm.mk index 294ab20e3a..1a0eb3ffb0 100644 --- a/gpu/command_buffer_service.target.darwin-arm.mk +++ b/gpu/command_buffer_service.target.darwin-arm.mk @@ -90,7 +90,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -143,12 +142,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -222,7 +224,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -276,12 +277,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -362,7 +366,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.target.darwin-mips.mk b/gpu/command_buffer_service.target.darwin-mips.mk index d137b07295..5843a2e6e9 100644 --- a/gpu/command_buffer_service.target.darwin-mips.mk +++ b/gpu/command_buffer_service.target.darwin-mips.mk @@ -90,7 +90,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -142,12 +141,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -221,7 +223,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -274,12 +275,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -358,7 +362,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.target.darwin-x86.mk b/gpu/command_buffer_service.target.darwin-x86.mk index c62123c3ff..dc4e02903d 100644 --- a/gpu/command_buffer_service.target.darwin-x86.mk +++ b/gpu/command_buffer_service.target.darwin-x86.mk @@ -89,7 +89,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -144,12 +143,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -221,7 +223,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -277,12 +278,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -360,7 +364,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.target.darwin-x86_64.mk b/gpu/command_buffer_service.target.darwin-x86_64.mk index a367631d65..1440f4c0b1 100644 --- a/gpu/command_buffer_service.target.darwin-x86_64.mk +++ b/gpu/command_buffer_service.target.darwin-x86_64.mk @@ -91,7 +91,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -144,12 +143,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -223,7 +225,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -277,12 +278,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -360,7 +364,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.target.linux-arm.mk b/gpu/command_buffer_service.target.linux-arm.mk index 294ab20e3a..1a0eb3ffb0 100644 --- a/gpu/command_buffer_service.target.linux-arm.mk +++ b/gpu/command_buffer_service.target.linux-arm.mk @@ -90,7 +90,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -143,12 +142,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -222,7 +224,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -276,12 +277,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -362,7 +366,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.target.linux-mips.mk b/gpu/command_buffer_service.target.linux-mips.mk index d137b07295..5843a2e6e9 100644 --- a/gpu/command_buffer_service.target.linux-mips.mk +++ b/gpu/command_buffer_service.target.linux-mips.mk @@ -90,7 +90,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -142,12 +141,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -221,7 +223,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -274,12 +275,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -358,7 +362,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.target.linux-x86.mk b/gpu/command_buffer_service.target.linux-x86.mk index c62123c3ff..dc4e02903d 100644 --- a/gpu/command_buffer_service.target.linux-x86.mk +++ b/gpu/command_buffer_service.target.linux-x86.mk @@ -89,7 +89,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -144,12 +143,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -221,7 +223,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -277,12 +278,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -360,7 +364,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/command_buffer_service.target.linux-x86_64.mk b/gpu/command_buffer_service.target.linux-x86_64.mk index a367631d65..1440f4c0b1 100644 --- a/gpu/command_buffer_service.target.linux-x86_64.mk +++ b/gpu/command_buffer_service.target.linux-x86_64.mk @@ -91,7 +91,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -144,12 +143,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -223,7 +225,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -277,12 +278,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DMESA_EGL_NO_X11_HEADERS' \ '-DUSE_OPENSSL=1' \ @@ -360,7 +364,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/config/gpu_blacklist.cc b/gpu/config/gpu_blacklist.cc index 8dae999eaa..8a67c63192 100644 --- a/gpu/config/gpu_blacklist.cc +++ b/gpu/config/gpu_blacklist.cc @@ -20,8 +20,8 @@ GpuBlacklist* GpuBlacklist::Create() { GpuBlacklist* list = new GpuBlacklist(); list->AddSupportedFeature("accelerated_2d_canvas", GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS); - list->AddSupportedFeature("accelerated_compositing", - GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING); + list->AddSupportedFeature("gpu_compositing", + GPU_FEATURE_TYPE_GPU_COMPOSITING); list->AddSupportedFeature("webgl", GPU_FEATURE_TYPE_WEBGL); list->AddSupportedFeature("flash_3d", @@ -40,8 +40,8 @@ GpuBlacklist* GpuBlacklist::Create() { GPU_FEATURE_TYPE_ACCELERATED_VIDEO); list->AddSupportedFeature("panel_fitting", GPU_FEATURE_TYPE_PANEL_FITTING); - list->AddSupportedFeature("force_compositing_mode", - GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE); + list->AddSupportedFeature("gpu_rasterization", + GPU_FEATURE_TYPE_GPU_RASTERIZATION); list->set_supports_feature_type_all(true); return list; } diff --git a/gpu/config/gpu_blacklist_unittest.cc b/gpu/config/gpu_blacklist_unittest.cc index c0f75ca467..539f2e623b 100644 --- a/gpu/config/gpu_blacklist_unittest.cc +++ b/gpu/config/gpu_blacklist_unittest.cc @@ -61,7 +61,8 @@ class GpuBlacklistTest : public testing::Test { gpu_info_.driver_vendor = "NVIDIA"; gpu_info_.driver_version = "1.6.18"; gpu_info_.driver_date = "7-14-2009"; - gpu_info_.machine_model = "MacBookPro 7.1"; + gpu_info_.machine_model_name = "MacBookPro"; + gpu_info_.machine_model_version = "7.1"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; gpu_info_.performance_stats.graphics = 5.0; @@ -91,9 +92,9 @@ GPU_BLACKLIST_FEATURE_TEST(Accelerated2DCanvas, "accelerated_2d_canvas", GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) -GPU_BLACKLIST_FEATURE_TEST(AcceleratedCompositing, - "accelerated_compositing", - GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) +GPU_BLACKLIST_FEATURE_TEST(GpuCompositing, + "gpu_compositing", + GPU_FEATURE_TYPE_GPU_COMPOSITING) GPU_BLACKLIST_FEATURE_TEST(WebGL, "webgl", @@ -131,8 +132,8 @@ GPU_BLACKLIST_FEATURE_TEST(PanelFitting, "panel_fitting", GPU_FEATURE_TYPE_PANEL_FITTING) -GPU_BLACKLIST_FEATURE_TEST(ForceCompositingMode, - "force_compositing_mode", - GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE) +GPU_BLACKLIST_FEATURE_TEST(GpuRasterization, + "gpu_rasterization", + GPU_FEATURE_TYPE_GPU_RASTERIZATION) } // namespace gpu diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc index 21088a1e99..b5e37c7851 100644 --- a/gpu/config/gpu_control_list.cc +++ b/gpu/config/gpu_control_list.cc @@ -243,32 +243,6 @@ GpuControlList::OsType GpuControlList::OsInfo::StringToOsType( return kOsUnknown; } -GpuControlList::MachineModelInfo::MachineModelInfo( - const std::string& name_op, - const std::string& name_value, - const std::string& version_op, - const std::string& version_string, - const std::string& version_string2) { - name_info_.reset(new StringInfo(name_op, name_value)); - version_info_.reset(new VersionInfo( - version_op, std::string(), version_string, version_string2)); -} - -GpuControlList::MachineModelInfo::~MachineModelInfo() {} - -bool GpuControlList::MachineModelInfo::Contains( - const std::string& name, const std::string& version) const { - if (!IsValid()) - return false; - if (!name_info_->Contains(name)) - return false; - return version_info_->Contains(version); -} - -bool GpuControlList::MachineModelInfo::IsValid() const { - return name_info_->IsValid() && version_info_->IsValid(); -} - GpuControlList::StringInfo::StringInfo(const std::string& string_op, const std::string& string_value) { op_ = StringToOp(string_op); @@ -500,7 +474,7 @@ GpuControlList::GpuControlListEntry::GetEntryFromValue( const base::ListValue* device_id_list; if (value->GetList("device_id", &device_id_list)) { for (size_t i = 0; i < device_id_list->GetSize(); ++i) { - std::string device_id; + std::string device_id; if (!device_id_list->GetString(i, &device_id) || !entry->AddDeviceId(device_id)) { LOG(WARNING) << "Malformed device_id entry " << entry->id(); @@ -692,28 +666,31 @@ GpuControlList::GpuControlListEntry::GetEntryFromValue( dictionary_entry_count++; } - const base::DictionaryValue* machine_model_value = NULL; - if (value->GetDictionary("machine_model", &machine_model_value)) { - std::string name_op; - std::string name_value; - const base::DictionaryValue* name = NULL; - if (machine_model_value->GetDictionary("name", &name)) { - name->GetString(kOp, &name_op); - name->GetString("value", &name_value); + const base::ListValue* machine_model_name_list; + if (value->GetList("machine_model_name", &machine_model_name_list)) { + for (size_t i = 0; i < machine_model_name_list->GetSize(); ++i) { + std::string model_name; + if (!machine_model_name_list->GetString(i, &model_name) || + !entry->AddMachineModelName(model_name)) { + LOG(WARNING) << "Malformed machine_model_name entry " << entry->id(); + return NULL; + } } + dictionary_entry_count++; + } + const base::DictionaryValue* machine_model_version_value = NULL; + if (value->GetDictionary( + "machine_model_version", &machine_model_version_value)) { std::string version_op = "any"; std::string version_string; std::string version_string2; - const base::DictionaryValue* version_value = NULL; - if (machine_model_value->GetDictionary("version", &version_value)) { - version_value->GetString(kOp, &version_op); - version_value->GetString("value", &version_string); - version_value->GetString("value2", &version_string2); - } - if (!entry->SetMachineModelInfo( - name_op, name_value, version_op, version_string, version_string2)) { - LOG(WARNING) << "Malformed machine_model entry " << entry->id(); + machine_model_version_value->GetString(kOp, &version_op); + machine_model_version_value->GetString("value", &version_string); + machine_model_version_value->GetString("value2", &version_string2); + if (!entry->SetMachineModelVersionInfo( + version_op, version_string, version_string2)) { + LOG(WARNING) << "Malformed machine_model_version entry " << entry->id(); return NULL; } dictionary_entry_count++; @@ -948,15 +925,21 @@ bool GpuControlList::GpuControlListEntry::SetPerfOverallInfo( return perf_overall_info_->IsValid(); } -bool GpuControlList::GpuControlListEntry::SetMachineModelInfo( - const std::string& name_op, - const std::string& name_value, +bool GpuControlList::GpuControlListEntry::AddMachineModelName( + const std::string& model_name) { + if (model_name.empty()) + return false; + machine_model_name_list_.push_back(model_name); + return true; +} + +bool GpuControlList::GpuControlListEntry::SetMachineModelVersionInfo( const std::string& version_op, const std::string& version_string, const std::string& version_string2) { - machine_model_info_.reset(new MachineModelInfo( - name_op, name_value, version_op, version_string, version_string2)); - return machine_model_info_->IsValid(); + machine_model_version_info_.reset(new VersionInfo( + version_op, std::string(), version_string, version_string2)); + return machine_model_version_info_->IsValid(); } bool GpuControlList::GpuControlListEntry::SetGpuCountInfo( @@ -1138,13 +1121,22 @@ bool GpuControlList::GpuControlListEntry::Contains( (gpu_info.performance_stats.overall == 0.0 || !perf_overall_info_->Contains(gpu_info.performance_stats.overall))) return false; - if (machine_model_info_.get() != NULL) { - std::vector<std::string> name_version; - base::SplitString(gpu_info.machine_model, ' ', &name_version); - if (name_version.size() == 2 && - !machine_model_info_->Contains(name_version[0], name_version[1])) + if (!machine_model_name_list_.empty() && + !gpu_info.machine_model_name.empty()) { + bool found_match = false; + for (size_t ii = 0; ii < machine_model_name_list_.size(); ++ii) { + if (machine_model_name_list_[ii] == gpu_info.machine_model_name) { + found_match = true; + break; + } + } + if (!found_match) return false; } + if (machine_model_version_info_.get() != NULL && + !gpu_info.machine_model_version.empty() && + !machine_model_version_info_->Contains(gpu_info.machine_model_version)) + return false; if (gpu_count_info_.get() != NULL && !gpu_count_info_->Contains(gpu_info.secondary_gpus.size() + 1)) return false; diff --git a/gpu/config/gpu_control_list.h b/gpu/config/gpu_control_list.h index 34d112b669..c3f1cf6fda 100644 --- a/gpu/config/gpu_control_list.h +++ b/gpu/config/gpu_control_list.h @@ -265,26 +265,6 @@ class GPU_EXPORT GpuControlList { bool value_; }; - class GPU_EXPORT MachineModelInfo { - public: - MachineModelInfo(const std::string& name_op, - const std::string& name_value, - const std::string& version_op, - const std::string& version_string, - const std::string& version_string2); - ~MachineModelInfo(); - - // Determines if a given name/version is included in the MachineModelInfo. - bool Contains(const std::string& name, const std::string& version) const; - - // Determines if the MachineModelInfo contains valid information. - bool IsValid() const; - - private: - scoped_ptr<StringInfo> name_info_; - scoped_ptr<VersionInfo> version_info_; - }; - class GpuControlListEntry; typedef scoped_refptr<GpuControlListEntry> ScopedGpuControlListEntry; @@ -419,11 +399,11 @@ class GPU_EXPORT GpuControlList { const std::string& float_string, const std::string& float_string2); - bool SetMachineModelInfo(const std::string& name_op, - const std::string& name_value, - const std::string& version_op, - const std::string& version_string, - const std::string& version_string2); + bool AddMachineModelName(const std::string& model_name); + + bool SetMachineModelVersionInfo(const std::string& version_op, + const std::string& version_string, + const std::string& version_string2); bool SetGpuCountInfo(const std::string& op, const std::string& int_string, @@ -469,7 +449,8 @@ class GPU_EXPORT GpuControlList { scoped_ptr<FloatInfo> perf_graphics_info_; scoped_ptr<FloatInfo> perf_gaming_info_; scoped_ptr<FloatInfo> perf_overall_info_; - scoped_ptr<MachineModelInfo> machine_model_info_; + std::vector<std::string> machine_model_name_list_; + scoped_ptr<VersionInfo> machine_model_version_info_; scoped_ptr<IntInfo> gpu_count_info_; scoped_ptr<BoolInfo> direct_rendering_info_; std::set<int> features_; diff --git a/gpu/config/gpu_control_list_entry_unittest.cc b/gpu/config/gpu_control_list_entry_unittest.cc index b62be3e660..849d201524 100644 --- a/gpu/config/gpu_control_list_entry_unittest.cc +++ b/gpu/config/gpu_control_list_entry_unittest.cc @@ -56,7 +56,6 @@ class GpuControlListEntryTest : public testing::Test { gpu_info_.driver_vendor = "NVIDIA"; gpu_info_.driver_version = "1.6.18"; gpu_info_.driver_date = "7-14-2009"; - gpu_info_.machine_model = "MacBookPro 7.1"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; gpu_info_.performance_stats.graphics = 5.0; @@ -707,6 +706,72 @@ TEST_F(GpuControlListEntryTest, SingleActiveGPU) { GpuControlList::kOsMacosx, "10.6", gpu_info())); } +TEST_F(GpuControlListEntryTest, MachineModelName) { + const std::string json = LONG_STRING_CONST( + { + "id": 1, + "os": { + "type": "android" + }, + "machine_model_name": ["Nexus 4", "XT1032"], + "features": [ + "test_feature_0" + ] + } + ); + ScopedEntry entry(GetEntryFromString(json)); + EXPECT_TRUE(entry.get() != NULL); + EXPECT_EQ(GpuControlList::kOsAndroid, entry->GetOsType()); + GPUInfo gpu_info; + + gpu_info.machine_model_name = "Nexus 4"; + EXPECT_TRUE(entry->Contains( + GpuControlList::kOsAndroid, "4.1", gpu_info)); + + gpu_info.machine_model_name = "XT1032"; + EXPECT_TRUE(entry->Contains( + GpuControlList::kOsAndroid, "4.1", gpu_info)); + + gpu_info.machine_model_name = "XT1032i"; + EXPECT_FALSE(entry->Contains( + GpuControlList::kOsAndroid, "4.1", gpu_info)); + + gpu_info.machine_model_name = "Nexus 5"; + EXPECT_FALSE(entry->Contains( + GpuControlList::kOsAndroid, "4.1", gpu_info)); + + gpu_info.machine_model_name = "Nexus"; + EXPECT_FALSE(entry->Contains( + GpuControlList::kOsAndroid, "4.1", gpu_info)); +} + +TEST_F(GpuControlListEntryTest, MachineModelVersion) { + const std::string json = LONG_STRING_CONST( + { + "id": 1, + "os": { + "type": "macosx" + }, + "machine_model_name": ["MacBookPro"], + "machine_model_version": { + "op": "=", + "value": "7.1" + }, + "features": [ + "test_feature_0" + ] + } + ); + ScopedEntry entry(GetEntryFromString(json)); + EXPECT_TRUE(entry.get() != NULL); + GPUInfo gpu_info; + gpu_info.machine_model_name = "MacBookPro"; + gpu_info.machine_model_version = "7.1"; + EXPECT_EQ(GpuControlList::kOsMacosx, entry->GetOsType()); + EXPECT_TRUE(entry->Contains( + GpuControlList::kOsMacosx, "10.6", gpu_info)); +} + class GpuControlListEntryDualGPUTest : public GpuControlListEntryTest { public: GpuControlListEntryDualGPUTest() { } diff --git a/gpu/config/gpu_control_list_format.txt b/gpu/config/gpu_control_list_format.txt index 40936b90fa..8bd0ec13e2 100644 --- a/gpu/config/gpu_control_list_format.txt +++ b/gpu/config/gpu_control_list_format.txt @@ -38,20 +38,21 @@ // 13. "perf_graphics" is a FLOAT structure (defined below). // 14. "perf_gaming" is a FLOAT structure (defined below). // 15. "perf_overall" is a FLOAT structure (defined below). -// 16. "machine_model" contais "name" and an optional "version". "name" is a -// STRING structure and "version" is a VERSION structure (defined below). -// 17. "gpu_count" is a INT structure (defined below). -// 18 "cpu_info" is a STRING structure (defined below). -// 19. "exceptions" is a list of entries. -// 20. "features" is a list of gpu control list options, which can be +// 16. "machine_model_name" is an array of strings. The strings can contain +// any characters. +// 17. "machine_model_version" is a VERSION structure (defined below). +// 18. "gpu_count" is a INT structure (defined below). +// 19 "cpu_info" is a STRING structure (defined below). +// 20. "exceptions" is a list of entries. +// 21. "features" is a list of gpu control list options, which can be // configured by a specific list. See its *_json.cc file for a list of // supported features. This field is mandatory. -// 21. "description" has the description of the entry. -// 22. "webkit_bugs" is an array of associated webkit bug numbers. -// 23. "cr_bugs" is an array of associated webkit bug numbers. -// 24. "disabled" is a boolean. If it is present, the entry will be skipped. +// 22. "description" has the description of the entry. +// 23. "webkit_bugs" is an array of associated webkit bug numbers. +// 24. "cr_bugs" is an array of associated webkit bug numbers. +// 25. "disabled" is a boolean. If it is present, the entry will be skipped. // This can not be used in exceptions. -// 25. "direct_rendering" is a boolean. If present, this will filter on whether +// 26. "direct_rendering" is a boolean. If present, this will filter on whether // the GL contexts are direct or indirect based on the value. // // VERSION includes "op", "style", "value", and "value2". "op" can be any of diff --git a/gpu/config/gpu_control_list_machine_model_info_unittest.cc b/gpu/config/gpu_control_list_machine_model_info_unittest.cc deleted file mode 100644 index 9c681a9264..0000000000 --- a/gpu/config/gpu_control_list_machine_model_info_unittest.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2013 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 "gpu/config/gpu_control_list.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace gpu { - -class MachineModelInfoTest : public testing::Test { - public: - MachineModelInfoTest() { } - virtual ~MachineModelInfoTest() { } - - typedef GpuControlList::MachineModelInfo MachineModelInfo; -}; - -TEST_F(MachineModelInfoTest, ValidModelInfo) { - const std::string name_op[] = { - "contains", - "beginwith", - "endwith", - "=" - }; - const std::string version_op[] = { - "=", - "<", - "<=", - ">", - ">=", - "any", - "between" - }; - for (size_t i = 0; i < arraysize(name_op); ++i) { - for (size_t j = 0; j < arraysize(version_op); ++j) { - std::string version1; - std::string version2; - if (version_op[j] != "any") - version1 = "3.14"; - if (version_op[j] == "between") - version2 = "5.4"; - MachineModelInfo info(name_op[i], "model", - version_op[j], version1, version2); - EXPECT_TRUE(info.IsValid()); - } - } -} - -TEST_F(MachineModelInfoTest, ModelComparison) { - MachineModelInfo info("=", "model_a", ">", "3.4", std::string()); - EXPECT_TRUE(info.Contains("model_a", "4")); - EXPECT_FALSE(info.Contains("model_b", "4")); - EXPECT_FALSE(info.Contains("model_a", "3.2")); -} - -} // namespace gpu - diff --git a/gpu/config/gpu_control_list_unittest.cc b/gpu/config/gpu_control_list_unittest.cc index 996276aff6..33c69734a2 100644 --- a/gpu/config/gpu_control_list_unittest.cc +++ b/gpu/config/gpu_control_list_unittest.cc @@ -52,7 +52,8 @@ class GpuControlListTest : public testing::Test { gpu_info_.driver_vendor = "NVIDIA"; gpu_info_.driver_version = "1.6.18"; gpu_info_.driver_date = "7-14-2009"; - gpu_info_.machine_model = "MacBookPro 7.1"; + gpu_info_.machine_model_name = "MacBookPro"; + gpu_info_.machine_model_version = "7.1"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; gpu_info_.performance_stats.graphics = 5.0; diff --git a/gpu/config/gpu_driver_bug_list_json.cc b/gpu/config/gpu_driver_bug_list_json.cc index aee1325d83..62a945606e 100644 --- a/gpu/config/gpu_driver_bug_list_json.cc +++ b/gpu/config/gpu_driver_bug_list_json.cc @@ -19,7 +19,7 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST( { "name": "gpu driver bug list", // Please update the version number whenever you change this file. - "version": "4.10", + "version": "5.0", "entries": [ { "id": 1, @@ -656,15 +656,10 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST( "value": "10.7" } }, - "machine_model": { - "name": { - "op": "=", - "value": "MacBookPro" - }, - "version": { - "op": "<", - "value": "8" - } + "machine_model_name": ["MacBookPro"], + "machine_model_version": { + "op": "<", + "value": "8" }, "gpu_count": { "op": "=", @@ -919,6 +914,36 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST( "features": [ "disable_post_sub_buffers_for_onscreen_surfaces" ] + }, + { + "id": 69, + "description": "Some shaders in Skia need more than the min available vertex and fragment shader uniform vectors in case of OSMesa", + "cr_bugs": [174845], + "driver_vendor": { + "op": "=", + "value": "osmesa" + }, + "features": [ + "max_fragment_uniform_vectors_32", + "max_varying_vectors_16", + "max_vertex_uniform_vectors_256" + ] + }, + { + "id": 70, + "description": "Disable D3D11 on older nVidia drivers", + "cr_bugs": [349929], + "os": { + "type": "win" + }, + "vendor_id": "0x10de", + "driver_version": { + "op": "<=", + "value": "8.17.12.6973" + }, + "features": [ + "disable_d3d11" + ] } ] } diff --git a/gpu/config/gpu_driver_bug_list_unittest.cc b/gpu/config/gpu_driver_bug_list_unittest.cc index 798cdbba7e..e927e6c2c7 100644 --- a/gpu/config/gpu_driver_bug_list_unittest.cc +++ b/gpu/config/gpu_driver_bug_list_unittest.cc @@ -32,7 +32,8 @@ class GpuDriverBugListTest : public testing::Test { gpu_info_.driver_vendor = "NVIDIA"; gpu_info_.driver_version = "1.6.18"; gpu_info_.driver_date = "7-14-2009"; - gpu_info_.machine_model = "MacBookPro 7.1"; + gpu_info_.machine_model_name = "MacBookPro"; + gpu_info_.machine_model_version = "7.1"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; gpu_info_.performance_stats.graphics = 5.0; @@ -156,5 +157,56 @@ TEST_F(GpuDriverBugListTest, AppendForceGPUWorkaround) { EXPECT_EQ(1u, workarounds.count(FORCE_DISCRETE_GPU)); } +TEST_F(GpuDriverBugListTest, NVIDIANumberingScheme) { + const std::string json = LONG_STRING_CONST( + { + "name": "gpu driver bug list", + "version": "0.1", + "entries": [ + { + "id": 1, + "os": { + "type": "win" + }, + "vendor_id": "0x10de", + "driver_version": { + "op": "<=", + "value": "8.17.12.6973" + }, + "features": [ + "disable_d3d11" + ] + } + ] + } + ); + + scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create()); + EXPECT_TRUE(list->LoadList(json, GpuControlList::kAllOs)); + + GPUInfo gpu_info; + gpu_info.gl_vendor = "NVIDIA"; + gpu_info.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; + gpu_info.gpu.vendor_id = 0x10de; + gpu_info.gpu.device_id = 0x0640; + + // test the same driver version number + gpu_info.driver_version = "8.17.12.6973"; + std::set<int> bugs = list->MakeDecision( + GpuControlList::kOsWin, "7.0", gpu_info); + EXPECT_EQ(1u, bugs.count(DISABLE_D3D11)); + + // test a lower driver version number + gpu_info.driver_version = "8.15.11.8647"; + + bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info); + EXPECT_EQ(1u, bugs.count(DISABLE_D3D11)); + + // test a higher driver version number + gpu_info.driver_version = "9.18.13.2723"; + bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info); + EXPECT_EQ(0u, bugs.count(DISABLE_D3D11)); +} + } // namespace gpu diff --git a/gpu/config/gpu_driver_bug_workaround_type.h b/gpu/config/gpu_driver_bug_workaround_type.h index 85776e2b39..06fa15b27c 100644 --- a/gpu/config/gpu_driver_bug_workaround_type.h +++ b/gpu/config/gpu_driver_bug_workaround_type.h @@ -62,8 +62,14 @@ max_cube_map_texture_size_limit_4096) \ GPU_OP(MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_512, \ max_cube_map_texture_size_limit_512) \ + GPU_OP(MAX_FRAGMENT_UNIFORM_VECTORS_32, \ + max_fragment_uniform_vectors_32) \ GPU_OP(MAX_TEXTURE_SIZE_LIMIT_4096, \ max_texture_size_limit_4096) \ + GPU_OP(MAX_VARYING_VECTORS_16, \ + max_varying_vectors_16) \ + GPU_OP(MAX_VERTEX_UNIFORM_VECTORS_256, \ + max_vertex_uniform_vectors_256) \ GPU_OP(NEEDS_GLSL_BUILT_IN_FUNCTION_EMULATION, \ needs_glsl_built_in_function_emulation) \ GPU_OP(NEEDS_OFFSCREEN_BUFFER_WORKAROUND, \ diff --git a/gpu/config/gpu_feature_type.h b/gpu/config/gpu_feature_type.h index 8d78191cfc..f023ecb4e5 100644 --- a/gpu/config/gpu_feature_type.h +++ b/gpu/config/gpu_feature_type.h @@ -12,7 +12,7 @@ namespace gpu { // If a bit is set to 1, corresponding feature is blacklisted. enum GpuFeatureType { GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS = 0, - GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING, + GPU_FEATURE_TYPE_GPU_COMPOSITING, GPU_FEATURE_TYPE_WEBGL, GPU_FEATURE_TYPE_FLASH3D, GPU_FEATURE_TYPE_FLASH_STAGE3D, @@ -21,8 +21,8 @@ enum GpuFeatureType { GPU_FEATURE_TYPE_3D_CSS, GPU_FEATURE_TYPE_ACCELERATED_VIDEO, GPU_FEATURE_TYPE_PANEL_FITTING, - GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE, GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE, + GPU_FEATURE_TYPE_GPU_RASTERIZATION, NUMBER_OF_GPU_FEATURE_TYPES }; diff --git a/gpu/config/gpu_info.cc b/gpu/config/gpu_info.cc index 0b5c4870ea..4734a5b148 100644 --- a/gpu/config/gpu_info.cc +++ b/gpu/config/gpu_info.cc @@ -60,7 +60,8 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { std::string driver_date; std::string pixel_shader_version; std::string vertex_shader_version; - std::string machine_model; + std::string machine_model_name; + std::string machine_model_version; std::string gl_version; std::string gl_version_string; std::string gl_vendor; @@ -88,7 +89,8 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { Fields_Have_Changed_In_GPUInfo_So_Update_Below); // Required fields (according to DevTools protocol) first. - enumerator->AddString("machineModel", machine_model); + enumerator->AddString("machineModelName", machine_model_name); + enumerator->AddString("machineModelVersion", machine_model_version); EnumerateGPUDevice(enumerator, gpu); for (size_t ii = 0; ii < secondary_gpus.size(); ++ii) { EnumerateGPUDevice(enumerator, secondary_gpus[ii]); diff --git a/gpu/config/gpu_info.h b/gpu/config/gpu_info.h index ee4a8b3b24..096c5331ce 100644 --- a/gpu/config/gpu_info.h +++ b/gpu/config/gpu_info.h @@ -100,9 +100,17 @@ struct GPU_EXPORT GPUInfo { // The version of the vertex shader used by the gpu. std::string vertex_shader_version; - // The machine model identifier with format "name major.minor". - // Name should not contain any whitespaces. - std::string machine_model; + // The machine model identifier. They can contain any character, including + // whitespaces. Currently it is supported on MacOSX and Android. + // Android examples: "Naxus 5", "XT1032". + // On MacOSX, the version is stripped out of the model identifier, for + // example, the original identifier is "MacBookPro7,2", and we put + // "MacBookPro" as machine_model_name, and "7.2" as machine_model_version. + std::string machine_model_name; + + // The version of the machine model. Currently it is supported on MacOSX. + // See machine_model_name's comment. + std::string machine_model_version; // The version of OpenGL we are using. // TODO(zmo): should be able to tell if it's GL or GLES. diff --git a/gpu/config/gpu_info_collector_android.cc b/gpu/config/gpu_info_collector_android.cc index e2905b0880..21c04d1860 100644 --- a/gpu/config/gpu_info_collector_android.cc +++ b/gpu/config/gpu_info_collector_android.cc @@ -99,7 +99,8 @@ CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { gpu_info->can_lose_context = false; gpu_info->finalized = true; - gpu_info->machine_model = base::android::BuildInfo::GetInstance()->model(); + gpu_info->machine_model_name = + base::android::BuildInfo::GetInstance()->model(); // Create a short-lived context on the UI thread to collect the GL strings. // Make sure we restore the existing context if there is one. diff --git a/gpu/config/gpu_info_collector_mac.mm b/gpu/config/gpu_info_collector_mac.mm index ec6a31d49c..8eff59a571 100644 --- a/gpu/config/gpu_info_collector_mac.mm +++ b/gpu/config/gpu_info_collector_mac.mm @@ -185,13 +185,12 @@ GpuIDResult CollectGpuID(uint32* vendor_id, uint32* device_id) { CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { DCHECK(gpu_info); - std::string model_name; int32 model_major = 0, model_minor = 0; base::mac::ParseModelIdentifier(base::mac::GetModelIdentifier(), - &model_name, &model_major, &model_minor); - base::ReplaceChars(model_name, " ", "_", &gpu_info->machine_model); - gpu_info->machine_model += " " + base::IntToString(model_major) + - "." + base::IntToString(model_minor); + &gpu_info->machine_model_name, + &model_major, &model_minor); + gpu_info->machine_model_version = + base::IntToString(model_major) + "." + base::IntToString(model_minor); bool result = CollectPCIVideoCardInfo(gpu_info); return result ? kCollectInfoSuccess : kCollectInfoNonFatalFailure; diff --git a/gpu/config/gpu_info_collector_x11.cc b/gpu/config/gpu_info_collector_x11.cc index b1182fa0ea..a603d1dac6 100644 --- a/gpu/config/gpu_info_collector_x11.cc +++ b/gpu/config/gpu_info_collector_x11.cc @@ -125,8 +125,18 @@ bool CollectPCIVideoCardInfo(GPUInfo* gpu_info) { device != NULL; device = device->next) { // Fill the IDs and class fields. (libpci_loader.pci_fill_info)(device, 33); - // TODO(zmo): there might be other classes that qualify as display devices. - if (device->device_class != 0x0300) // Device class is DISPLAY_VGA. + bool is_gpu = false; + switch (device->device_class) { + case PCI_CLASS_DISPLAY_VGA: + case PCI_CLASS_DISPLAY_XGA: + case PCI_CLASS_DISPLAY_3D: + is_gpu = true; + break; + case PCI_CLASS_DISPLAY_OTHER: + default: + break; + } + if (!is_gpu) continue; GPUInfo::GPUDevice gpu; diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc index 6f1d3d9f64..4f21182954 100644 --- a/gpu/config/software_rendering_list_json.cc +++ b/gpu/config/software_rendering_list_json.cc @@ -18,7 +18,7 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST( { "name": "software rendering list", // Please update the version number whenever you change this file. - "version": "7.6", + "version": "8.0", "entries": [ { "id": 1, @@ -949,12 +949,7 @@ LONG_STRING_CONST( "value": "4.1.2" } }, - "machine_model": { - "name": { - "op": "=", - "value": "GT-N7100" - } - }, + "machine_model_name": ["GT-N7100"], "features": [ "accelerated_video_decode" ] @@ -966,12 +961,7 @@ LONG_STRING_CONST( "os": { "type": "android" }, - "machine_model": { - "name": { - "op": "=", - "value": "SCH-I545" - } - }, + "machine_model_name": ["SCH-I545"], "features": [ "accelerated_video_decode" ] @@ -1131,6 +1121,21 @@ LONG_STRING_CONST( "features": [ "all" ] + }, + { + "id": 96, + "description": "GPU rasterization is whitelisted on N4, N5, N7 and Moto X", + "cr_bugs": [362779], + "exceptions": [ + { + "machine_model_name": ["Nexus 4", "Nexus 5", "Nexus 7", + "XT1049", "XT1050", "XT1052", "XT1053", + "XT1055", "XT1056", "XT1058", "XT1060"] + } + ], + "features": [ + "gpu_rasterization" + ] } ] } diff --git a/gpu/disk_cache_proto.target.darwin-arm.mk b/gpu/disk_cache_proto.target.darwin-arm.mk index 30ca9667b6..bd23f9ec14 100644 --- a/gpu/disk_cache_proto.target.darwin-arm.mk +++ b/gpu/disk_cache_proto.target.darwin-arm.mk @@ -252,7 +252,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/disk_cache_proto.target.darwin-mips.mk b/gpu/disk_cache_proto.target.darwin-mips.mk index 3b0ca33913..8c20a25a63 100644 --- a/gpu/disk_cache_proto.target.darwin-mips.mk +++ b/gpu/disk_cache_proto.target.darwin-mips.mk @@ -248,7 +248,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/disk_cache_proto.target.darwin-x86.mk b/gpu/disk_cache_proto.target.darwin-x86.mk index 8d12aa0f27..322ff8b00a 100644 --- a/gpu/disk_cache_proto.target.darwin-x86.mk +++ b/gpu/disk_cache_proto.target.darwin-x86.mk @@ -250,7 +250,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/disk_cache_proto.target.darwin-x86_64.mk b/gpu/disk_cache_proto.target.darwin-x86_64.mk index e78fc1dc84..2483f0bb43 100644 --- a/gpu/disk_cache_proto.target.darwin-x86_64.mk +++ b/gpu/disk_cache_proto.target.darwin-x86_64.mk @@ -250,7 +250,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/disk_cache_proto.target.linux-arm.mk b/gpu/disk_cache_proto.target.linux-arm.mk index 30ca9667b6..bd23f9ec14 100644 --- a/gpu/disk_cache_proto.target.linux-arm.mk +++ b/gpu/disk_cache_proto.target.linux-arm.mk @@ -252,7 +252,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/disk_cache_proto.target.linux-mips.mk b/gpu/disk_cache_proto.target.linux-mips.mk index 3b0ca33913..8c20a25a63 100644 --- a/gpu/disk_cache_proto.target.linux-mips.mk +++ b/gpu/disk_cache_proto.target.linux-mips.mk @@ -248,7 +248,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/disk_cache_proto.target.linux-x86.mk b/gpu/disk_cache_proto.target.linux-x86.mk index 8d12aa0f27..322ff8b00a 100644 --- a/gpu/disk_cache_proto.target.linux-x86.mk +++ b/gpu/disk_cache_proto.target.linux-x86.mk @@ -250,7 +250,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/disk_cache_proto.target.linux-x86_64.mk b/gpu/disk_cache_proto.target.linux-x86_64.mk index e78fc1dc84..2483f0bb43 100644 --- a/gpu/disk_cache_proto.target.linux-x86_64.mk +++ b/gpu/disk_cache_proto.target.linux-x86_64.mk @@ -250,7 +250,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gl_in_process_context.target.darwin-arm.mk b/gpu/gl_in_process_context.target.darwin-arm.mk new file mode 100644 index 0000000000..b6c367f546 --- /dev/null +++ b/gpu/gl_in_process_context.target.darwin-arm.mk @@ -0,0 +1,286 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -fno-tree-sra \ + -fuse-ld=gold \ + -Wno-psabi \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-abi \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -fno-tree-sra \ + -fuse-ld=gold \ + -Wno-psabi \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-abi \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -Wl,-z,relro \ + -Wl,-z,now \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--icf=safe \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -Wl,-z,relro \ + -Wl,-z,now \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--icf=safe \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gl_in_process_context.target.darwin-mips.mk b/gpu/gl_in_process_context.target.darwin-mips.mk new file mode 100644 index 0000000000..9faf8ae99b --- /dev/null +++ b/gpu/gl_in_process_context.target.darwin-mips.mk @@ -0,0 +1,280 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -EL \ + -mhard-float \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-uninitialized \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -EL \ + -mhard-float \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-uninitialized \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -EL \ + -Wl,--no-keep-memory \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -EL \ + -Wl,--no-keep-memory \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gl_in_process_context.target.darwin-x86.mk b/gpu/gl_in_process_context.target.darwin-x86.mk new file mode 100644 index 0000000000..1d0d54bdf9 --- /dev/null +++ b/gpu/gl_in_process_context.target.darwin-x86.mk @@ -0,0 +1,282 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -msse2 \ + -mfpmath=sse \ + -mmmx \ + -m32 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -fno-stack-protector \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -msse2 \ + -mfpmath=sse \ + -mmmx \ + -m32 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -fno-stack-protector \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m32 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m32 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gl_in_process_context.target.darwin-x86_64.mk b/gpu/gl_in_process_context.target.darwin-x86_64.mk new file mode 100644 index 0000000000..2d66906204 --- /dev/null +++ b/gpu/gl_in_process_context.target.darwin-x86_64.mk @@ -0,0 +1,282 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -Wno-unused-local-typedefs \ + -m64 \ + -march=x86-64 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -Wno-unused-local-typedefs \ + -m64 \ + -march=x86-64 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m64 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m64 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gl_in_process_context.target.linux-arm.mk b/gpu/gl_in_process_context.target.linux-arm.mk new file mode 100644 index 0000000000..b6c367f546 --- /dev/null +++ b/gpu/gl_in_process_context.target.linux-arm.mk @@ -0,0 +1,286 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -fno-tree-sra \ + -fuse-ld=gold \ + -Wno-psabi \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-abi \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -fno-tree-sra \ + -fuse-ld=gold \ + -Wno-psabi \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-abi \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -Wl,-z,relro \ + -Wl,-z,now \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--icf=safe \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -Wl,-z,relro \ + -Wl,-z,now \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--icf=safe \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gl_in_process_context.target.linux-mips.mk b/gpu/gl_in_process_context.target.linux-mips.mk new file mode 100644 index 0000000000..9faf8ae99b --- /dev/null +++ b/gpu/gl_in_process_context.target.linux-mips.mk @@ -0,0 +1,280 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -EL \ + -mhard-float \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-uninitialized \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -EL \ + -mhard-float \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-uninitialized \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -EL \ + -Wl,--no-keep-memory \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -EL \ + -Wl,--no-keep-memory \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gl_in_process_context.target.linux-x86.mk b/gpu/gl_in_process_context.target.linux-x86.mk new file mode 100644 index 0000000000..1d0d54bdf9 --- /dev/null +++ b/gpu/gl_in_process_context.target.linux-x86.mk @@ -0,0 +1,282 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -msse2 \ + -mfpmath=sse \ + -mmmx \ + -m32 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -fno-stack-protector \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -msse2 \ + -mfpmath=sse \ + -mmmx \ + -m32 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -fno-stack-protector \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m32 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m32 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gl_in_process_context.target.linux-x86_64.mk b/gpu/gl_in_process_context.target.linux-x86_64.mk new file mode 100644 index 0000000000..2d66906204 --- /dev/null +++ b/gpu/gl_in_process_context.target.linux-x86_64.mk @@ -0,0 +1,282 @@ +# This file is generated by gyp; do not edit. + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := gpu_gl_in_process_context_gyp +LOCAL_MODULE_SUFFIX := .a +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH) +gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX)) +gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX)) + +# Make sure our deps are built first. +GYP_TARGET_DEPENDENCIES := \ + $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a + +GYP_GENERATED_OUTPUTS := + +# Make sure our deps and generated files are built first. +LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) + +LOCAL_CPP_EXTENSION := .cc +LOCAL_GENERATED_SOURCES := + +GYP_COPIED_SOURCE_ORIGIN_DIRS := + +LOCAL_SRC_FILES := \ + gpu/command_buffer/client/gl_in_process_context.cc + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Debug := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -Wno-unused-local-typedefs \ + -m64 \ + -march=x86-64 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -g \ + -fomit-frame-pointer \ + -fdata-sections \ + -ffunction-sections \ + -funwind-tables + +MY_DEFS_Debug := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ + '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ + '-D_DEBUG' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Debug := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Debug := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +# Flags passed to both C and C++ files. +MY_CFLAGS_Release := \ + -fstack-protector \ + --param=ssp-buffer-size=4 \ + -Werror \ + -fno-exceptions \ + -fno-strict-aliasing \ + -Wall \ + -Wno-unused-parameter \ + -Wno-missing-field-initializers \ + -fvisibility=hidden \ + -pipe \ + -fPIC \ + -Wno-unused-local-typedefs \ + -m64 \ + -march=x86-64 \ + -fuse-ld=gold \ + -ffunction-sections \ + -funwind-tables \ + -g \ + -fstack-protector \ + -fno-short-enums \ + -finline-limit=64 \ + -Wa,--noexecstack \ + -U_FORTIFY_SOURCE \ + -Wno-extra \ + -Wno-ignored-qualifiers \ + -Wno-type-limits \ + -Wno-unused-but-set-variable \ + -Os \ + -fno-ident \ + -fdata-sections \ + -ffunction-sections \ + -fomit-frame-pointer \ + -funwind-tables + +MY_DEFS_Release := \ + '-DV8_DEPRECATION_WARNINGS' \ + '-DBLINK_SCALE_FILTERS_AT_RECORD_TIME' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DNO_TCMALLOC' \ + '-DDISABLE_NACL' \ + '-DCHROMIUM_BUILD' \ + '-DUSE_LIBJPEG_TURBO=1' \ + '-DENABLE_WEBRTC=1' \ + '-DUSE_PROPRIETARY_CODECS' \ + '-DENABLE_CONFIGURATION_POLICY' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ + '-DENABLE_EGLIMAGE=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_PRINTING=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DGL_IN_PROCESS_CONTEXT_IMPLEMENTATION' \ + '-DMESA_EGL_NO_X11_HEADERS' \ + '-DUSE_OPENSSL=1' \ + '-DUSE_OPENSSL_CERTS=1' \ + '-D__STDC_CONSTANT_MACROS' \ + '-D__STDC_FORMAT_MACROS' \ + '-DANDROID' \ + '-D__GNU_SOURCE=1' \ + '-DUSE_STLPORT=1' \ + '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ + '-DCHROME_BUILD_ID=""' \ + '-DNDEBUG' \ + '-DNVALGRIND' \ + '-DDYNAMIC_ANNOTATIONS_ENABLED=0' \ + '-D_FORTIFY_SOURCE=2' + + +# Include paths placed before CFLAGS/CPPFLAGS +LOCAL_C_INCLUDES_Release := \ + $(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \ + $(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \ + $(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \ + $(LOCAL_PATH)/third_party/khronos \ + $(LOCAL_PATH)/gpu \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/skia/config \ + $(gyp_shared_intermediate_dir)/ui/gl \ + $(LOCAL_PATH)/third_party/mesa/src/include \ + $(PWD)/frameworks/wilhelm/include \ + $(PWD)/bionic \ + $(PWD)/external/stlport/stlport + + +# Flags passed to only C++ (and not C) files. +LOCAL_CPPFLAGS_Release := \ + -fno-rtti \ + -fno-threadsafe-statics \ + -fvisibility-inlines-hidden \ + -Wsign-compare \ + -Wno-non-virtual-dtor \ + -Wno-sign-promo + + +LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) +LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) +LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) +LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +### Rules for final target. + +LOCAL_LDFLAGS_Debug := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m64 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,--warn-shared-textrel \ + -Wl,-O1 \ + -Wl,--as-needed + + +LOCAL_LDFLAGS_Release := \ + -Wl,-z,now \ + -Wl,-z,relro \ + -Wl,--fatal-warnings \ + -Wl,-z,noexecstack \ + -fPIC \ + -m64 \ + -fuse-ld=gold \ + -nostdlib \ + -Wl,--no-undefined \ + -Wl,--exclude-libs=ALL \ + -Wl,-O1 \ + -Wl,--as-needed \ + -Wl,--gc-sections \ + -Wl,--warn-shared-textrel + + +LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) + +LOCAL_STATIC_LIBRARIES := \ + ui_gl_gl_gyp + +# Enable grouping to fix circular references +LOCAL_GROUP_STATIC_LIBRARIES := true + +LOCAL_SHARED_LIBRARIES := \ + libstlport \ + libdl + +# Add target alias to "gyp_all_modules" target. +.PHONY: gyp_all_modules +gyp_all_modules: gpu_gl_in_process_context_gyp + +# Alias gyp target name. +.PHONY: gl_in_process_context +gl_in_process_context: gpu_gl_in_process_context_gyp + +include $(BUILD_STATIC_LIBRARY) diff --git a/gpu/gles2_c_lib.target.darwin-arm.mk b/gpu/gles2_c_lib.target.darwin-arm.mk index 43aa600eb7..4a19cafe13 100644 --- a/gpu/gles2_c_lib.target.darwin-arm.mk +++ b/gpu/gles2_c_lib.target.darwin-arm.mk @@ -232,7 +232,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_c_lib.target.darwin-mips.mk b/gpu/gles2_c_lib.target.darwin-mips.mk index b23ae453d7..5a46a764b5 100644 --- a/gpu/gles2_c_lib.target.darwin-mips.mk +++ b/gpu/gles2_c_lib.target.darwin-mips.mk @@ -228,7 +228,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_c_lib.target.darwin-x86.mk b/gpu/gles2_c_lib.target.darwin-x86.mk index e817e91374..77f1bdf8b6 100644 --- a/gpu/gles2_c_lib.target.darwin-x86.mk +++ b/gpu/gles2_c_lib.target.darwin-x86.mk @@ -230,7 +230,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_c_lib.target.darwin-x86_64.mk b/gpu/gles2_c_lib.target.darwin-x86_64.mk index 7f1dc45fc6..1789b98536 100644 --- a/gpu/gles2_c_lib.target.darwin-x86_64.mk +++ b/gpu/gles2_c_lib.target.darwin-x86_64.mk @@ -230,7 +230,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_c_lib.target.linux-arm.mk b/gpu/gles2_c_lib.target.linux-arm.mk index 43aa600eb7..4a19cafe13 100644 --- a/gpu/gles2_c_lib.target.linux-arm.mk +++ b/gpu/gles2_c_lib.target.linux-arm.mk @@ -232,7 +232,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_c_lib.target.linux-mips.mk b/gpu/gles2_c_lib.target.linux-mips.mk index b23ae453d7..5a46a764b5 100644 --- a/gpu/gles2_c_lib.target.linux-mips.mk +++ b/gpu/gles2_c_lib.target.linux-mips.mk @@ -228,7 +228,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_c_lib.target.linux-x86.mk b/gpu/gles2_c_lib.target.linux-x86.mk index e817e91374..77f1bdf8b6 100644 --- a/gpu/gles2_c_lib.target.linux-x86.mk +++ b/gpu/gles2_c_lib.target.linux-x86.mk @@ -230,7 +230,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_c_lib.target.linux-x86_64.mk b/gpu/gles2_c_lib.target.linux-x86_64.mk index 7f1dc45fc6..1789b98536 100644 --- a/gpu/gles2_c_lib.target.linux-x86_64.mk +++ b/gpu/gles2_c_lib.target.linux-x86_64.mk @@ -230,7 +230,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.darwin-arm.mk b/gpu/gles2_cmd_helper.target.darwin-arm.mk index d0a716e2c7..c376a69b12 100644 --- a/gpu/gles2_cmd_helper.target.darwin-arm.mk +++ b/gpu/gles2_cmd_helper.target.darwin-arm.mk @@ -223,7 +223,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.darwin-mips.mk b/gpu/gles2_cmd_helper.target.darwin-mips.mk index b57e3754cb..5005137181 100644 --- a/gpu/gles2_cmd_helper.target.darwin-mips.mk +++ b/gpu/gles2_cmd_helper.target.darwin-mips.mk @@ -219,7 +219,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.darwin-x86.mk b/gpu/gles2_cmd_helper.target.darwin-x86.mk index 5e21bad34b..15d28ddc73 100644 --- a/gpu/gles2_cmd_helper.target.darwin-x86.mk +++ b/gpu/gles2_cmd_helper.target.darwin-x86.mk @@ -221,7 +221,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.darwin-x86_64.mk b/gpu/gles2_cmd_helper.target.darwin-x86_64.mk index 1eb16440d3..9aa4d71b69 100644 --- a/gpu/gles2_cmd_helper.target.darwin-x86_64.mk +++ b/gpu/gles2_cmd_helper.target.darwin-x86_64.mk @@ -221,7 +221,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.linux-arm.mk b/gpu/gles2_cmd_helper.target.linux-arm.mk index d0a716e2c7..c376a69b12 100644 --- a/gpu/gles2_cmd_helper.target.linux-arm.mk +++ b/gpu/gles2_cmd_helper.target.linux-arm.mk @@ -223,7 +223,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.linux-mips.mk b/gpu/gles2_cmd_helper.target.linux-mips.mk index b57e3754cb..5005137181 100644 --- a/gpu/gles2_cmd_helper.target.linux-mips.mk +++ b/gpu/gles2_cmd_helper.target.linux-mips.mk @@ -219,7 +219,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.linux-x86.mk b/gpu/gles2_cmd_helper.target.linux-x86.mk index 5e21bad34b..15d28ddc73 100644 --- a/gpu/gles2_cmd_helper.target.linux-x86.mk +++ b/gpu/gles2_cmd_helper.target.linux-x86.mk @@ -221,7 +221,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_cmd_helper.target.linux-x86_64.mk b/gpu/gles2_cmd_helper.target.linux-x86_64.mk index 1eb16440d3..9aa4d71b69 100644 --- a/gpu/gles2_cmd_helper.target.linux-x86_64.mk +++ b/gpu/gles2_cmd_helper.target.linux-x86_64.mk @@ -221,7 +221,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gles2_conform_support/gles2_conform_support.gyp b/gpu/gles2_conform_support/gles2_conform_support.gyp index b2ebe14467..d34996e7f8 100644 --- a/gpu/gles2_conform_support/gles2_conform_support.gyp +++ b/gpu/gles2_conform_support/gles2_conform_support.gyp @@ -83,11 +83,6 @@ 'egl_native', '../../third_party/khronos/khronos.gyp:khronos_headers', ], - 'conditions': [ - ['toolkit_uses_gtk == 1', { - 'dependencies': ['../../build/linux/system.gyp:gtk'], - }], - ], 'sources': [ 'native/main.cc', 'native/egl_native.cc', @@ -111,9 +106,6 @@ '../../third_party/expat/expat.gyp:expat', ], 'conditions': [ - ['toolkit_uses_gtk == 1', { - 'dependencies': ['../../build/linux/system.gyp:gtk'], - }], # See http://crbug.com/162998#c4 for why this is needed. # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554 ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', { diff --git a/gpu/gles2_implementation.target.darwin-arm.mk b/gpu/gles2_implementation.target.darwin-arm.mk index b29b73eaed..35f6cc3c5b 100644 --- a/gpu/gles2_implementation.target.darwin-arm.mk +++ b/gpu/gles2_implementation.target.darwin-arm.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -52,7 +50,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -94,23 +91,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -136,19 +116,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -178,7 +145,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -220,23 +186,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -263,19 +212,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -311,7 +247,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -339,8 +274,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gles2_implementation.target.darwin-mips.mk b/gpu/gles2_implementation.target.darwin-mips.mk index 0c7c0128e8..12a9e315cc 100644 --- a/gpu/gles2_implementation.target.darwin-mips.mk +++ b/gpu/gles2_implementation.target.darwin-mips.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -52,7 +50,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -93,23 +90,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -135,19 +115,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -177,7 +144,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -218,23 +184,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -261,19 +210,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -307,7 +243,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -333,8 +268,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gles2_implementation.target.darwin-x86.mk b/gpu/gles2_implementation.target.darwin-x86.mk index 159a2e8656..dcec676944 100644 --- a/gpu/gles2_implementation.target.darwin-x86.mk +++ b/gpu/gles2_implementation.target.darwin-x86.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -51,7 +49,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -95,23 +92,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -137,19 +117,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -177,7 +144,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -221,23 +187,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -264,19 +213,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -309,7 +245,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -335,8 +270,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gles2_implementation.target.darwin-x86_64.mk b/gpu/gles2_implementation.target.darwin-x86_64.mk index d827abe2d4..deb383cf73 100644 --- a/gpu/gles2_implementation.target.darwin-x86_64.mk +++ b/gpu/gles2_implementation.target.darwin-x86_64.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -53,7 +51,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -95,23 +92,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -137,19 +117,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -179,7 +146,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -221,23 +187,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -264,19 +213,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -309,7 +245,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -335,8 +270,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gles2_implementation.target.linux-arm.mk b/gpu/gles2_implementation.target.linux-arm.mk index b29b73eaed..35f6cc3c5b 100644 --- a/gpu/gles2_implementation.target.linux-arm.mk +++ b/gpu/gles2_implementation.target.linux-arm.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -52,7 +50,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -94,23 +91,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -136,19 +116,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -178,7 +145,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -220,23 +186,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -263,19 +212,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -311,7 +247,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -339,8 +274,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gles2_implementation.target.linux-mips.mk b/gpu/gles2_implementation.target.linux-mips.mk index 0c7c0128e8..12a9e315cc 100644 --- a/gpu/gles2_implementation.target.linux-mips.mk +++ b/gpu/gles2_implementation.target.linux-mips.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -52,7 +50,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -93,23 +90,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -135,19 +115,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -177,7 +144,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -218,23 +184,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -261,19 +210,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -307,7 +243,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -333,8 +268,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gles2_implementation.target.linux-x86.mk b/gpu/gles2_implementation.target.linux-x86.mk index 159a2e8656..dcec676944 100644 --- a/gpu/gles2_implementation.target.linux-x86.mk +++ b/gpu/gles2_implementation.target.linux-x86.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -51,7 +49,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -95,23 +92,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -137,19 +117,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -177,7 +144,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -221,23 +187,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -264,19 +213,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -309,7 +245,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -335,8 +270,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gles2_implementation.target.linux-x86_64.mk b/gpu/gles2_implementation.target.linux-x86_64.mk index d827abe2d4..deb383cf73 100644 --- a/gpu/gles2_implementation.target.linux-x86_64.mk +++ b/gpu/gles2_implementation.target.linux-x86_64.mk @@ -13,8 +13,7 @@ gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_V # Make sure our deps are built first. GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp,,,$(GYP_VAR_PREFIX))/khronos_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a + $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp,,,$(GYP_VAR_PREFIX))/ui_gl_gl_gyp.a GYP_GENERATED_OUTPUTS := @@ -35,8 +34,7 @@ LOCAL_SRC_FILES := \ gpu/command_buffer/client/program_info_manager.cc \ gpu/command_buffer/client/query_tracker.cc \ gpu/command_buffer/client/share_group.cc \ - gpu/command_buffer/client/vertex_array_object_manager.cc \ - gpu/command_buffer/client/gl_in_process_context.cc + gpu/command_buffer/client/vertex_array_object_manager.cc # Flags passed to both C and C++ files. @@ -53,7 +51,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -95,23 +92,6 @@ MY_DEFS_Debug := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -137,19 +117,6 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -179,7 +146,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -221,23 +187,6 @@ MY_DEFS_Release := \ '-DENABLE_MANAGED_USERS=1' \ '-DGLES2_IMPL_IMPLEMENTATION' \ '-DMESA_EGL_NO_X11_HEADERS' \ - '-DSK_ENABLE_INST_COUNT=0' \ - '-DSK_SUPPORT_GPU=1' \ - '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' \ - '-DSK_ENABLE_LEGACY_API_ALIASING=1' \ - '-DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1' \ - '-DGR_GL_IGNORE_ES3_MSAA=0' \ - '-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \ - '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ - '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ - '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ - '-DSK_SUPPORT_LEGACY_N32_NAME' \ - '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ - '-DSK_BUILD_FOR_ANDROID' \ - '-DSK_USE_POSIX_THREADS' \ - '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ - '-DU_USING_ICU_NAMESPACE=0' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -264,19 +213,6 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/config \ $(gyp_shared_intermediate_dir)/ui/gl \ $(LOCAL_PATH)/third_party/mesa/src/include \ - $(LOCAL_PATH)/third_party/skia/src/core \ - $(LOCAL_PATH)/third_party/skia/include/core \ - $(LOCAL_PATH)/third_party/skia/include/effects \ - $(LOCAL_PATH)/third_party/skia/include/pdf \ - $(LOCAL_PATH)/third_party/skia/include/gpu \ - $(LOCAL_PATH)/third_party/skia/include/lazy \ - $(LOCAL_PATH)/third_party/skia/include/pathops \ - $(LOCAL_PATH)/third_party/skia/include/pipe \ - $(LOCAL_PATH)/third_party/skia/include/ports \ - $(LOCAL_PATH)/third_party/skia/include/utils \ - $(LOCAL_PATH)/skia/ext \ - $(PWD)/external/icu4c/common \ - $(PWD)/external/icu4c/i18n \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ $(PWD)/external/stlport/stlport @@ -309,7 +245,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -335,8 +270,7 @@ LOCAL_LDFLAGS_Release := \ LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) LOCAL_STATIC_LIBRARIES := \ - ui_gl_gl_gyp \ - skia_skia_library_gyp + ui_gl_gl_gyp # Enable grouping to fix circular references LOCAL_GROUP_STATIC_LIBRARIES := true diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index 57b358e62b..8022d48834 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp @@ -16,11 +16,9 @@ 'type': '<(component)', 'dependencies': [ '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../third_party/khronos/khronos.gyp:khronos_headers', - '../ui/gl/gl.gyp:gl', - '../ui/gfx/gfx.gyp:gfx', '../ui/gfx/gfx.gyp:gfx_geometry', + '../ui/gl/gl.gyp:gl', 'command_buffer/command_buffer.gyp:gles2_utils', 'gles2_cmd_helper', ], @@ -29,13 +27,31 @@ ], 'sources': [ '<@(gles2_implementation_source_files)', - 'command_buffer/client/gl_in_process_context.h', - 'command_buffer/client/gl_in_process_context.cc', ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [4267, ], }, { + 'target_name': 'gl_in_process_context', + 'type': '<(component)', + 'dependencies': [ + 'gles2_implementation', + 'gpu', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../ui/gfx/gfx.gyp:gfx_geometry', + '../ui/gl/gl.gyp:gl', + ], + 'defines': [ + 'GL_IN_PROCESS_CONTEXT_IMPLEMENTATION', + ], + 'sources': [ + 'command_buffer/client/gl_in_process_context.h', + 'command_buffer/client/gl_in_process_context.cc', + 'command_buffer/client/gl_in_process_context_export.h', + ], + }, + { # Library emulates GLES2 using command_buffers. 'target_name': 'gles2_implementation_client_side_arrays', 'type': '<(component)', @@ -244,7 +260,6 @@ 'command_buffer/service/gpu_tracer_unittest.cc', 'config/gpu_blacklist_unittest.cc', 'config/gpu_control_list_entry_unittest.cc', - 'config/gpu_control_list_machine_model_info_unittest.cc', 'config/gpu_control_list_number_info_unittest.cc', 'config/gpu_control_list_os_info_unittest.cc', 'config/gpu_control_list_string_info_unittest.cc', @@ -579,7 +594,6 @@ ], 'variables': { 'test_suite_name': 'gl_tests', - 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)gl_tests<(SHARED_LIB_SUFFIX)', }, 'includes': [ '../build/apk_test.gypi', diff --git a/gpu/gpu_common.gypi b/gpu/gpu_common.gypi index 68808f2911..4550fc796f 100644 --- a/gpu/gpu_common.gypi +++ b/gpu/gpu_common.gypi @@ -61,7 +61,6 @@ ], 'variables': { 'test_suite_name': 'gpu_unittests', - 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)gpu_unittests<(SHARED_LIB_SUFFIX)', }, 'includes': [ '../build/apk_test.gypi' ], }, diff --git a/gpu/gpu_config.target.darwin-arm.mk b/gpu/gpu_config.target.darwin-arm.mk index 2cb6c37f8d..07af3792ac 100644 --- a/gpu/gpu_config.target.darwin-arm.mk +++ b/gpu/gpu_config.target.darwin-arm.mk @@ -52,7 +52,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -148,7 +147,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -251,7 +249,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_config.target.darwin-mips.mk b/gpu/gpu_config.target.darwin-mips.mk index 87a6b2a8d3..5f8d2c4878 100644 --- a/gpu/gpu_config.target.darwin-mips.mk +++ b/gpu/gpu_config.target.darwin-mips.mk @@ -52,7 +52,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -147,7 +146,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -247,7 +245,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_config.target.darwin-x86.mk b/gpu/gpu_config.target.darwin-x86.mk index 25ea8fbcc8..15517dd2d8 100644 --- a/gpu/gpu_config.target.darwin-x86.mk +++ b/gpu/gpu_config.target.darwin-x86.mk @@ -51,7 +51,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -147,7 +146,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -249,7 +247,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_config.target.darwin-x86_64.mk b/gpu/gpu_config.target.darwin-x86_64.mk index 4013653aea..4307af068a 100644 --- a/gpu/gpu_config.target.darwin-x86_64.mk +++ b/gpu/gpu_config.target.darwin-x86_64.mk @@ -53,7 +53,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -149,7 +148,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -249,7 +247,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_config.target.linux-arm.mk b/gpu/gpu_config.target.linux-arm.mk index 2cb6c37f8d..07af3792ac 100644 --- a/gpu/gpu_config.target.linux-arm.mk +++ b/gpu/gpu_config.target.linux-arm.mk @@ -52,7 +52,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -148,7 +147,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -251,7 +249,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_config.target.linux-mips.mk b/gpu/gpu_config.target.linux-mips.mk index 87a6b2a8d3..5f8d2c4878 100644 --- a/gpu/gpu_config.target.linux-mips.mk +++ b/gpu/gpu_config.target.linux-mips.mk @@ -52,7 +52,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -147,7 +146,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -247,7 +245,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_config.target.linux-x86.mk b/gpu/gpu_config.target.linux-x86.mk index 25ea8fbcc8..15517dd2d8 100644 --- a/gpu/gpu_config.target.linux-x86.mk +++ b/gpu/gpu_config.target.linux-x86.mk @@ -51,7 +51,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -147,7 +146,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -249,7 +247,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_config.target.linux-x86_64.mk b/gpu/gpu_config.target.linux-x86_64.mk index 4013653aea..4307af068a 100644 --- a/gpu/gpu_config.target.linux-x86_64.mk +++ b/gpu/gpu_config.target.linux-x86_64.mk @@ -53,7 +53,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -149,7 +148,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -249,7 +247,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.darwin-arm.mk b/gpu/gpu_ipc.target.darwin-arm.mk index 871d4793d7..7a01f56c5c 100644 --- a/gpu/gpu_ipc.target.darwin-arm.mk +++ b/gpu/gpu_ipc.target.darwin-arm.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.darwin-mips.mk b/gpu/gpu_ipc.target.darwin-mips.mk index 634ab6ee45..1f2dbb7949 100644 --- a/gpu/gpu_ipc.target.darwin-mips.mk +++ b/gpu/gpu_ipc.target.darwin-mips.mk @@ -220,7 +220,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.darwin-x86.mk b/gpu/gpu_ipc.target.darwin-x86.mk index c3d40d61bc..c8c8023cbe 100644 --- a/gpu/gpu_ipc.target.darwin-x86.mk +++ b/gpu/gpu_ipc.target.darwin-x86.mk @@ -222,7 +222,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.darwin-x86_64.mk b/gpu/gpu_ipc.target.darwin-x86_64.mk index 8c679c2282..d6221b46e3 100644 --- a/gpu/gpu_ipc.target.darwin-x86_64.mk +++ b/gpu/gpu_ipc.target.darwin-x86_64.mk @@ -222,7 +222,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.linux-arm.mk b/gpu/gpu_ipc.target.linux-arm.mk index 871d4793d7..7a01f56c5c 100644 --- a/gpu/gpu_ipc.target.linux-arm.mk +++ b/gpu/gpu_ipc.target.linux-arm.mk @@ -224,7 +224,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.linux-mips.mk b/gpu/gpu_ipc.target.linux-mips.mk index 634ab6ee45..1f2dbb7949 100644 --- a/gpu/gpu_ipc.target.linux-mips.mk +++ b/gpu/gpu_ipc.target.linux-mips.mk @@ -220,7 +220,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.linux-x86.mk b/gpu/gpu_ipc.target.linux-x86.mk index c3d40d61bc..c8c8023cbe 100644 --- a/gpu/gpu_ipc.target.linux-x86.mk +++ b/gpu/gpu_ipc.target.linux-x86.mk @@ -222,7 +222,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/gpu_ipc.target.linux-x86_64.mk b/gpu/gpu_ipc.target.linux-x86_64.mk index 8c679c2282..d6221b46e3 100644 --- a/gpu/gpu_ipc.target.linux-x86_64.mk +++ b/gpu/gpu_ipc.target.linux-x86_64.mk @@ -222,7 +222,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc b/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc index b8079d12ca..2894cf7c7d 100644 --- a/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc +++ b/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc @@ -74,6 +74,8 @@ GrGLInterface* CreateCommandBufferSkiaGLBinding() { functions->fInsertEventMarker = glInsertEventMarkerEXT; functions->fLineWidth = glLineWidth; functions->fLinkProgram = glLinkProgram; + functions->fMapBufferSubData = glMapBufferSubDataCHROMIUM; + functions->fMapTexSubImage2D = glMapTexSubImage2DCHROMIUM; functions->fPixelStorei = glPixelStorei; functions->fPopGroupMarker = glPopGroupMarkerEXT; functions->fPushGroupMarker = glPushGroupMarkerEXT; @@ -110,6 +112,8 @@ GrGLInterface* CreateCommandBufferSkiaGLBinding() { functions->fUniformMatrix2fv = glUniformMatrix2fv; functions->fUniformMatrix3fv = glUniformMatrix3fv; functions->fUniformMatrix4fv = glUniformMatrix4fv; + functions->fUnmapBufferSubData = glUnmapBufferSubDataCHROMIUM; + functions->fUnmapTexSubImage2D = glUnmapTexSubImage2DCHROMIUM; functions->fUseProgram = glUseProgram; functions->fVertexAttrib4fv = glVertexAttrib4fv; functions->fVertexAttribPointer = glVertexAttribPointer; diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-arm.mk b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-arm.mk index 2ddabec898..300f0f006a 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-arm.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-arm.mk @@ -91,12 +91,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -209,12 +212,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -285,7 +291,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-mips.mk b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-mips.mk index 946ad80e37..e57641dc17 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-mips.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-mips.mk @@ -90,12 +90,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -207,12 +210,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -281,7 +287,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86.mk b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86.mk index dbd93c0ecf..b7ceff1540 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86.mk @@ -92,12 +92,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -210,12 +213,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -283,7 +289,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86_64.mk b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86_64.mk index b549df8aaf..bd25a832f9 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86_64.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.darwin-x86_64.mk @@ -92,12 +92,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -210,12 +213,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -283,7 +289,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.linux-arm.mk b/gpu/skia_bindings/gpu_skia_bindings.target.linux-arm.mk index 2ddabec898..300f0f006a 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.linux-arm.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.linux-arm.mk @@ -91,12 +91,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -209,12 +212,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -285,7 +291,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.linux-mips.mk b/gpu/skia_bindings/gpu_skia_bindings.target.linux-mips.mk index 946ad80e37..e57641dc17 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.linux-mips.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.linux-mips.mk @@ -90,12 +90,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -207,12 +210,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -281,7 +287,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86.mk b/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86.mk index dbd93c0ecf..b7ceff1540 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86.mk @@ -92,12 +92,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -210,12 +213,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -283,7 +289,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86_64.mk b/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86_64.mk index b549df8aaf..bd25a832f9 100644 --- a/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86_64.mk +++ b/gpu/skia_bindings/gpu_skia_bindings.target.linux-x86_64.mk @@ -92,12 +92,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -210,12 +213,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DUSE_OPENSSL=1' \ '-DUSE_OPENSSL_CERTS=1' \ '-D__STDC_CONSTANT_MACROS' \ @@ -283,7 +289,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed |