Slim down set of things updated by roll script This reduces the list of directories updated from chromium down to be only //base, //build, //sandbox/linux and //mojo/public and their dependencies. Other directories can be updated as needed. Follow up patches will strip out parts of these components that aren't needed for Mojo development. R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/1052993005
diff --git a/mojo/tools/roll/cc_strip_video.patch b/mojo/tools/roll/cc_strip_video.patch deleted file mode 100644 index 8d1a3b0..0000000 --- a/mojo/tools/roll/cc_strip_video.patch +++ /dev/null
@@ -1,775 +0,0 @@ -diff --git a/cc/BUILD.gn b/cc/BUILD.gn -index bd8bfdd..6e55656 100644 ---- a/cc/BUILD.gn -+++ b/cc/BUILD.gn -@@ -189,13 +189,6 @@ component("cc") { - "layers/ui_resource_layer.h", - "layers/ui_resource_layer_impl.cc", - "layers/ui_resource_layer_impl.h", -- "layers/video_frame_provider.h", -- "layers/video_frame_provider_client_impl.cc", -- "layers/video_frame_provider_client_impl.h", -- "layers/video_layer.cc", -- "layers/video_layer.h", -- "layers/video_layer_impl.cc", -- "layers/video_layer_impl.h", - "output/begin_frame_args.cc", - "output/begin_frame_args.h", - "output/bsp_tree.cc", -@@ -458,8 +451,6 @@ component("cc") { - "resources/ui_resource_client.h", - "resources/ui_resource_request.cc", - "resources/ui_resource_request.h", -- "resources/video_resource_updater.cc", -- "resources/video_resource_updater.h", - "resources/zero_copy_tile_task_worker_pool.cc", - "resources/zero_copy_tile_task_worker_pool.h", - "scheduler/begin_frame_source.cc", -@@ -606,8 +597,6 @@ source_set("test_support") { - "test/fake_tile_manager_client.h", - "test/fake_ui_resource_layer_tree_host_impl.cc", - "test/fake_ui_resource_layer_tree_host_impl.h", -- "test/fake_video_frame_provider.cc", -- "test/fake_video_frame_provider.h", - "test/geometry_test_utils.cc", - "test/geometry_test_utils.h", - "test/impl_side_painting_settings.h", -@@ -766,7 +755,6 @@ test("cc_unittests") { - "layers/tiled_layer_unittest.cc", - "layers/ui_resource_layer_impl_unittest.cc", - "layers/ui_resource_layer_unittest.cc", -- "layers/video_layer_impl_unittest.cc", - "output/begin_frame_args_unittest.cc", - "output/delegating_renderer_unittest.cc", - "output/filter_operations_unittest.cc", -@@ -827,7 +815,6 @@ test("cc_unittests") { - "trees/layer_tree_host_unittest_picture.cc", - "trees/layer_tree_host_unittest_proxy.cc", - "trees/layer_tree_host_unittest_scroll.cc", -- "trees/layer_tree_host_unittest_video.cc", - "trees/layer_tree_impl_unittest.cc", - "trees/occlusion_tracker_unittest.cc", - "trees/occlusion_unittest.cc", -diff --git a/cc/layers/video_frame_provider.h b/cc/layers/video_frame_provider.h -deleted file mode 100644 -index 784d951..0000000 ---- a/cc/layers/video_frame_provider.h -+++ /dev/null -@@ -1,63 +0,0 @@ --// Copyright (c) 2012 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ --#define CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ -- --#include "base/memory/ref_counted.h" -- --namespace media { --class VideoFrame; --} -- --namespace cc { -- --// Threading notes: This class may be used in a multi threaded manner. --// Specifically, the implementation may call GetCurrentFrame() or --// PutCurrentFrame() from the compositor thread. If so, the caller is --// responsible for making sure Client::DidReceiveFrame() and --// Client::DidUpdateMatrix() are only called from this same thread. --class VideoFrameProvider { -- public: -- virtual ~VideoFrameProvider() {} -- -- class Client { -- public: -- // Provider will call this method to tell the client to stop using it. -- // StopUsingProvider() may be called from any thread. The client should -- // block until it has PutCurrentFrame() any outstanding frames. -- virtual void StopUsingProvider() = 0; -- -- // Notifies the provider's client that a call to GetCurrentFrame() will -- // return new data. -- virtual void DidReceiveFrame() = 0; -- -- // Notifies the provider's client of a new UV transform matrix to be used. -- virtual void DidUpdateMatrix(const float* matrix) = 0; -- -- protected: -- virtual ~Client() {} -- }; -- -- // May be called from any thread, but there must be some external guarantee -- // that the provider is not destroyed before this call returns. -- virtual void SetVideoFrameProviderClient(Client* client) = 0; -- -- // This function places a lock on the current frame and returns a pointer to -- // it. Calls to this method should always be followed with a call to -- // PutCurrentFrame(). -- // Only the current provider client should call this function. -- virtual scoped_refptr<media::VideoFrame> GetCurrentFrame() = 0; -- -- // This function releases the lock on the video frame. It should always be -- // called after GetCurrentFrame(). Frames passed into this method -- // should no longer be referenced after the call is made. Only the current -- // provider client should call this function. -- virtual void PutCurrentFrame( -- const scoped_refptr<media::VideoFrame>& frame) = 0; --}; -- --} // namespace cc -- --#endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ -diff --git a/cc/layers/video_frame_provider_client_impl.cc b/cc/layers/video_frame_provider_client_impl.cc -deleted file mode 100644 -index 4bbd92f..0000000 ---- a/cc/layers/video_frame_provider_client_impl.cc -+++ /dev/null -@@ -1,116 +0,0 @@ --// Copyright 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 "cc/layers/video_frame_provider_client_impl.h" -- --#include "base/trace_event/trace_event.h" --#include "cc/base/math_util.h" --#include "cc/layers/video_layer_impl.h" --#include "media/base/video_frame.h" -- --namespace cc { -- --// static --scoped_refptr<VideoFrameProviderClientImpl> -- VideoFrameProviderClientImpl::Create( -- VideoFrameProvider* provider) { -- return make_scoped_refptr( -- new VideoFrameProviderClientImpl(provider)); --} -- --VideoFrameProviderClientImpl::~VideoFrameProviderClientImpl() {} -- --VideoFrameProviderClientImpl::VideoFrameProviderClientImpl( -- VideoFrameProvider* provider) -- : active_video_layer_(nullptr), provider_(provider) { -- // This only happens during a commit on the compositor thread while the main -- // thread is blocked. That makes this a thread-safe call to set the video -- // frame provider client that does not require a lock. The same is true of -- // the call to Stop(). -- provider_->SetVideoFrameProviderClient(this); -- -- // This matrix is the default transformation for stream textures, and flips -- // on the Y axis. -- stream_texture_matrix_ = gfx::Transform( -- 1.0, 0.0, 0.0, 0.0, -- 0.0, -1.0, 0.0, 1.0, -- 0.0, 0.0, 1.0, 0.0, -- 0.0, 0.0, 0.0, 1.0); --} -- --void VideoFrameProviderClientImpl::SetActiveVideoLayer( -- VideoLayerImpl* video_layer) { -- DCHECK(thread_checker_.CalledOnValidThread()); -- DCHECK(video_layer); -- active_video_layer_ = video_layer; --} -- --void VideoFrameProviderClientImpl::Stop() { -- // It's called when the main thread is blocked, so lock isn't needed. -- if (!provider_) -- return; -- DCHECK(thread_checker_.CalledOnValidThread()); -- provider_->SetVideoFrameProviderClient(nullptr); -- provider_ = nullptr; --} -- --bool VideoFrameProviderClientImpl::Stopped() { -- DCHECK(thread_checker_.CalledOnValidThread()); -- // |provider_| is changed while the main thread is blocked, and not changed -- // thereafter, so lock isn't needed. -- return !provider_; --} -- --scoped_refptr<media::VideoFrame> --VideoFrameProviderClientImpl::AcquireLockAndCurrentFrame() { -- DCHECK(thread_checker_.CalledOnValidThread()); -- provider_lock_.Acquire(); // Balanced by call to ReleaseLock(). -- if (!provider_) -- return nullptr; -- -- return provider_->GetCurrentFrame(); --} -- --void VideoFrameProviderClientImpl::PutCurrentFrame( -- const scoped_refptr<media::VideoFrame>& frame) { -- DCHECK(thread_checker_.CalledOnValidThread()); -- provider_lock_.AssertAcquired(); -- provider_->PutCurrentFrame(frame); --} -- --void VideoFrameProviderClientImpl::ReleaseLock() { -- DCHECK(thread_checker_.CalledOnValidThread()); -- provider_lock_.AssertAcquired(); -- provider_lock_.Release(); --} -- --void VideoFrameProviderClientImpl::StopUsingProvider() { -- // Block the provider from shutting down until this client is done -- // using the frame. -- base::AutoLock locker(provider_lock_); -- provider_ = nullptr; --} -- --void VideoFrameProviderClientImpl::DidReceiveFrame() { -- TRACE_EVENT1("cc", -- "VideoFrameProviderClientImpl::DidReceiveFrame", -- "active_video_layer", -- !!active_video_layer_); -- DCHECK(thread_checker_.CalledOnValidThread()); -- if (active_video_layer_) -- active_video_layer_->SetNeedsRedraw(); --} -- --void VideoFrameProviderClientImpl::DidUpdateMatrix(const float* matrix) { -- DCHECK(thread_checker_.CalledOnValidThread()); -- stream_texture_matrix_ = gfx::Transform( -- matrix[0], matrix[4], matrix[8], matrix[12], -- matrix[1], matrix[5], matrix[9], matrix[13], -- matrix[2], matrix[6], matrix[10], matrix[14], -- matrix[3], matrix[7], matrix[11], matrix[15]); -- if (active_video_layer_) -- active_video_layer_->SetNeedsRedraw(); --} -- --} // namespace cc -diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc -index d02df4f..9166ea8 100644 ---- a/cc/output/renderer_pixeltest.cc -+++ b/cc/output/renderer_pixeltest.cc -@@ -11,7 +11,6 @@ - #include "cc/test/fake_picture_pile_impl.h" - #include "cc/test/pixel_test.h" - #include "gpu/command_buffer/client/gles2_interface.h" --#include "media/base/video_frame.h" - #include "third_party/skia/include/core/SkColorPriv.h" - #include "third_party/skia/include/core/SkImageFilter.h" - #include "third_party/skia/include/core/SkMatrix.h" -@@ -907,267 +906,6 @@ TEST_F(GLRendererPixelTest, NonPremultipliedTextureWithBackground) { - FuzzyPixelOffByOneComparator(true))); - } - --class VideoGLRendererPixelTest : public GLRendererPixelTest { -- protected: -- void CreateEdgeBleedPass(media::VideoFrame::Format format, -- RenderPassList* pass_list) { -- gfx::Rect rect(200, 200); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- // Scale the video up so that bilinear filtering kicks in to sample more -- // than just nearest neighbor would. -- gfx::Transform scale_by_2; -- scale_by_2.Scale(2.f, 2.f); -- gfx::Rect half_rect(100, 100); -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(scale_by_2, half_rect, pass.get()); -- -- gfx::Size background_size(200, 200); -- gfx::Rect green_rect(16, 20, 100, 100); -- gfx::RectF tex_coord_rect( -- static_cast<float>(green_rect.x()) / background_size.width(), -- static_cast<float>(green_rect.y()) / background_size.height(), -- static_cast<float>(green_rect.width()) / background_size.width(), -- static_cast<float>(green_rect.height()) / background_size.height()); -- -- // YUV of (149,43,21) should be green (0,255,0) in RGB. -- // Create a video frame that has a non-green background rect, with a -- // green sub-rectangle that should be the only thing displayed in -- // the final image. Bleeding will appear on all four sides of the video -- // if the tex coords are not clamped. -- CreateTestYUVVideoDrawQuad_TwoColor( -- shared_state, format, false, tex_coord_rect, background_size, -- gfx::Rect(background_size), 0, 0, 0, green_rect, 149, 43, 21, -- pass.get(), video_resource_updater_.get(), resource_provider_.get()); -- pass_list->push_back(pass.Pass()); -- } -- -- void SetUp() override { -- GLRendererPixelTest::SetUp(); -- video_resource_updater_.reset(new VideoResourceUpdater( -- output_surface_->context_provider(), resource_provider_.get())); -- } -- -- scoped_ptr<VideoResourceUpdater> video_resource_updater_; --}; -- --TEST_F(VideoGLRendererPixelTest, SimpleYUVRect) { -- gfx::Rect rect(this->device_viewport_size_); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); -- -- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12, -- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), -- pass.get(), video_resource_updater_.get(), -- rect, rect, resource_provider_.get()); -- -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- EXPECT_TRUE( -- this->RunPixelTest(&pass_list, -- base::FilePath(FILE_PATH_LITERAL("yuv_stripes.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, ClippedYUVRect) { -- gfx::Rect viewport(this->device_viewport_size_); -- gfx::Rect draw_rect(this->device_viewport_size_.width() * 1.5, -- this->device_viewport_size_.height() * 1.5); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, viewport); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), viewport, pass.get()); -- -- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12, -- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), -- pass.get(), video_resource_updater_.get(), -- draw_rect, viewport, -- resource_provider_.get()); -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- EXPECT_TRUE(this->RunPixelTest( -- &pass_list, base::FilePath(FILE_PATH_LITERAL("yuv_stripes_clipped.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, OffsetYUVRect) { -- gfx::Rect rect(this->device_viewport_size_); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); -- -- // Intentionally sets frame format to I420 for testing coverage. -- CreateTestYUVVideoDrawQuad_Striped( -- shared_state, media::VideoFrame::I420, false, -- gfx::RectF(0.125f, 0.25f, 0.75f, 0.5f), pass.get(), -- video_resource_updater_.get(), rect, rect, resource_provider_.get()); -- -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- EXPECT_TRUE(this->RunPixelTest( -- &pass_list, -- base::FilePath(FILE_PATH_LITERAL("yuv_stripes_offset.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, SimpleYUVRectBlack) { -- gfx::Rect rect(this->device_viewport_size_); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); -- -- // In MPEG color range YUV values of (15,128,128) should produce black. -- CreateTestYUVVideoDrawQuad_Solid( -- shared_state, media::VideoFrame::YV12, false, -- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(), -- video_resource_updater_.get(), rect, rect, resource_provider_.get()); -- -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- // If we didn't get black out of the YUV values above, then we probably have a -- // color range issue. -- EXPECT_TRUE(this->RunPixelTest(&pass_list, -- base::FilePath(FILE_PATH_LITERAL("black.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, SimpleYUVJRect) { -- gfx::Rect rect(this->device_viewport_size_); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); -- -- // YUV of (149,43,21) should be green (0,255,0) in RGB. -- CreateTestYUVVideoDrawQuad_Solid( -- shared_state, media::VideoFrame::YV12J, false, -- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 149, 43, 21, pass.get(), -- video_resource_updater_.get(), rect, rect, resource_provider_.get()); -- -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- EXPECT_TRUE(this->RunPixelTest(&pass_list, -- base::FilePath(FILE_PATH_LITERAL("green.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --// Test that a YUV video doesn't bleed outside of its tex coords when the --// tex coord rect is only a partial subrectangle of the coded contents. --TEST_F(VideoGLRendererPixelTest, YUVEdgeBleed) { -- RenderPassList pass_list; -- CreateEdgeBleedPass(media::VideoFrame::YV12J, &pass_list); -- EXPECT_TRUE(this->RunPixelTest(&pass_list, -- base::FilePath(FILE_PATH_LITERAL("green.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, YUVAEdgeBleed) { -- RenderPassList pass_list; -- CreateEdgeBleedPass(media::VideoFrame::YV12A, &pass_list); -- EXPECT_TRUE(this->RunPixelTest(&pass_list, -- base::FilePath(FILE_PATH_LITERAL("green.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, SimpleYUVJRectGrey) { -- gfx::Rect rect(this->device_viewport_size_); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); -- -- // Dark grey in JPEG color range (in MPEG, this is black). -- CreateTestYUVVideoDrawQuad_Solid( -- shared_state, media::VideoFrame::YV12J, false, -- gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 15, 128, 128, pass.get(), -- video_resource_updater_.get(), rect, rect, resource_provider_.get()); -- -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- EXPECT_TRUE( -- this->RunPixelTest(&pass_list, -- base::FilePath(FILE_PATH_LITERAL("dark_grey.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, SimpleYUVARect) { -- gfx::Rect rect(this->device_viewport_size_); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); -- -- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A, -- false, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), -- pass.get(), video_resource_updater_.get(), -- rect, rect, resource_provider_.get()); -- -- SolidColorDrawQuad* color_quad = -- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); -- color_quad->SetNew(shared_state, rect, rect, SK_ColorWHITE, false); -- -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- EXPECT_TRUE(this->RunPixelTest( -- &pass_list, -- base::FilePath(FILE_PATH_LITERAL("yuv_stripes_alpha.png")), -- FuzzyPixelOffByOneComparator(true))); --} -- --TEST_F(VideoGLRendererPixelTest, FullyTransparentYUVARect) { -- gfx::Rect rect(this->device_viewport_size_); -- -- RenderPassId id(1, 1); -- scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); -- -- SharedQuadState* shared_state = -- CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); -- -- CreateTestYUVVideoDrawQuad_Striped(shared_state, media::VideoFrame::YV12A, -- true, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), -- pass.get(), video_resource_updater_.get(), -- rect, rect, resource_provider_.get()); -- -- SolidColorDrawQuad* color_quad = -- pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); -- color_quad->SetNew(shared_state, rect, rect, SK_ColorBLACK, false); -- -- RenderPassList pass_list; -- pass_list.push_back(pass.Pass()); -- -- EXPECT_TRUE(this->RunPixelTest( -- &pass_list, -- base::FilePath(FILE_PATH_LITERAL("black.png")), -- ExactPixelComparator(true))); --} -- - TYPED_TEST(RendererPixelTest, FastPassColorFilterAlpha) { - gfx::Rect viewport_rect(this->device_viewport_size_); - -diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display_item.cc -index 648f9de..6dffad9 100644 ---- a/cc/resources/drawing_display_item.cc -+++ b/cc/resources/drawing_display_item.cc -@@ -6,6 +6,7 @@ - - #include <string> - -+#include "base/logging.h" - #include "base/strings/stringprintf.h" - #include "base/trace_event/trace_event_argument.h" - #include "cc/debug/picture_debug_util.h" -diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc -index 8056387..e8471e2 100644 ---- a/cc/trees/layer_tree_host_impl_unittest.cc -+++ b/cc/trees/layer_tree_host_impl_unittest.cc -@@ -26,7 +26,6 @@ - #include "cc/layers/solid_color_scrollbar_layer_impl.h" - #include "cc/layers/texture_layer_impl.h" - #include "cc/layers/tiled_layer_impl.h" --#include "cc/layers/video_layer_impl.h" - #include "cc/output/begin_frame_args.h" - #include "cc/output/compositor_frame_ack.h" - #include "cc/output/compositor_frame_metadata.h" -@@ -47,7 +46,6 @@ - #include "cc/test/fake_picture_layer_impl.h" - #include "cc/test/fake_picture_pile_impl.h" - #include "cc/test/fake_proxy.h" --#include "cc/test/fake_video_frame_provider.h" - #include "cc/test/geometry_test_utils.h" - #include "cc/test/layer_test_common.h" - #include "cc/test/layer_tree_test.h" -@@ -57,7 +55,6 @@ - #include "cc/test/test_web_graphics_context_3d.h" - #include "cc/trees/layer_tree_impl.h" - #include "cc/trees/single_thread_proxy.h" --#include "media/base/media.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" - #include "third_party/skia/include/core/SkMallocPixelRef.h" -@@ -71,7 +68,6 @@ using ::testing::Return; - using ::testing::AnyNumber; - using ::testing::AtLeast; - using ::testing::_; --using media::VideoFrame; - - namespace cc { - namespace { -@@ -96,7 +92,6 @@ class LayerTreeHostImplTest : public testing::Test, - reduce_memory_result_(true), - current_limit_bytes_(0), - current_priority_cutoff_value_(0) { -- media::InitializeMediaLibraryForTesting(); - } - - LayerTreeSettings DefaultSettings() { -@@ -5473,18 +5468,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) { - root_layer->SetBounds(gfx::Size(10, 10)); - root_layer->SetHasRenderSurface(true); - -- scoped_refptr<VideoFrame> softwareFrame = -- media::VideoFrame::CreateColorFrame( -- gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); -- FakeVideoFrameProvider provider; -- provider.set_frame(softwareFrame); -- scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( -- host_impl_->active_tree(), 4, &provider, media::VIDEO_ROTATION_0); -- video_layer->SetBounds(gfx::Size(10, 10)); -- video_layer->SetContentBounds(gfx::Size(10, 10)); -- video_layer->SetDrawsContent(true); -- root_layer->AddChild(video_layer.Pass()); -- - scoped_ptr<IOSurfaceLayerImpl> io_surface_layer = - IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5); - io_surface_layer->SetBounds(gfx::Size(10, 10)); -@@ -6566,16 +6549,6 @@ TEST_F(LayerTreeHostImplTest, - scoped_ptr<SolidColorLayerImpl> root_layer = - SolidColorLayerImpl::Create(host_impl_->active_tree(), 1); - -- // VideoLayerImpl will not be drawn. -- FakeVideoFrameProvider provider; -- scoped_ptr<VideoLayerImpl> video_layer = VideoLayerImpl::Create( -- host_impl_->active_tree(), 2, &provider, media::VIDEO_ROTATION_0); -- video_layer->SetBounds(gfx::Size(10, 10)); -- video_layer->SetContentBounds(gfx::Size(10, 10)); -- video_layer->SetDrawsContent(true); -- root_layer->AddChild(video_layer.Pass()); -- SetupRootLayerImpl(root_layer.Pass()); -- - LayerTreeHostImpl::FrameData frame; - EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); - host_impl_->DrawLayers(&frame, gfx::FrameTime::Now()); -diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc -index aacabd7..9416474 100644 ---- a/cc/trees/layer_tree_host_unittest.cc -+++ b/cc/trees/layer_tree_host_unittest.cc -@@ -17,7 +17,6 @@ - #include "cc/layers/painted_scrollbar_layer.h" - #include "cc/layers/picture_layer.h" - #include "cc/layers/solid_color_layer.h" --#include "cc/layers/video_layer.h" - #include "cc/output/begin_frame_args.h" - #include "cc/output/compositor_frame_ack.h" - #include "cc/output/copy_output_request.h" -@@ -41,7 +40,6 @@ - #include "cc/test/fake_picture_pile.h" - #include "cc/test/fake_proxy.h" - #include "cc/test/fake_scoped_ui_resource.h" --#include "cc/test/fake_video_frame_provider.h" - #include "cc/test/geometry_test_utils.h" - #include "cc/test/impl_side_painting_settings.h" - #include "cc/test/layer_tree_test.h" -@@ -4256,28 +4254,6 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTest { - int num_draws_; - }; - --// VideoLayer must support being invalidated and then passing that along --// to the compositor thread, even though no resources are updated in --// response to that invalidation. --class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw { -- public: -- void SetupTree() override { -- LayerTreeHostTest::SetupTree(); -- scoped_refptr<VideoLayer> video_layer = -- VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0); -- video_layer->SetBounds(gfx::Size(10, 10)); -- video_layer->SetIsDrawable(true); -- layer_tree_host()->root_layer()->AddChild(video_layer); -- -- invalidate_layer_ = video_layer; -- } -- -- private: -- FakeVideoFrameProvider provider_; --}; -- --SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestVideoLayerInvalidate); -- - // IOSurfaceLayer must support being invalidated and then passing that along - // to the compositor thread, even though no resources are updated in - // response to that invalidation. -diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc -index c99180d..cc536f4 100644 ---- a/cc/trees/layer_tree_host_unittest_context.cc -+++ b/cc/trees/layer_tree_host_unittest_context.cc -@@ -15,8 +15,6 @@ - #include "cc/layers/picture_layer.h" - #include "cc/layers/texture_layer.h" - #include "cc/layers/texture_layer_impl.h" --#include "cc/layers/video_layer.h" --#include "cc/layers/video_layer_impl.h" - #include "cc/output/filter_operations.h" - #include "cc/resources/single_release_callback.h" - #include "cc/test/failure_output_surface.h" -@@ -33,7 +31,6 @@ - #include "cc/test/fake_picture_layer_impl.h" - #include "cc/test/fake_scoped_ui_resource.h" - #include "cc/test/fake_scrollbar.h" --#include "cc/test/fake_video_frame_provider.h" - #include "cc/test/layer_tree_test.h" - #include "cc/test/render_pass_test_common.h" - #include "cc/test/test_context_provider.h" -@@ -43,9 +40,6 @@ - #include "cc/trees/layer_tree_impl.h" - #include "cc/trees/single_thread_proxy.h" - #include "gpu/GLES2/gl2extchromium.h" --#include "media/base/media.h" -- --using media::VideoFrame; - - namespace cc { - namespace { -@@ -66,7 +60,6 @@ class LayerTreeHostContextTest : public LayerTreeTest { - context_should_support_io_surface_(false), - fallback_context_works_(false), - async_output_surface_creation_(false) { -- media::InitializeMediaLibraryForTesting(); - } - - void LoseContext() { -@@ -1055,41 +1048,6 @@ class LayerTreeHostContextTestDontUseLostResources - layer_with_mask->SetMaskLayer(mask.get()); - root->AddChild(layer_with_mask); - -- scoped_refptr<VideoLayer> video_color = -- VideoLayer::Create(&color_frame_provider_, media::VIDEO_ROTATION_0); -- video_color->SetBounds(gfx::Size(10, 10)); -- video_color->SetIsDrawable(true); -- root->AddChild(video_color); -- -- scoped_refptr<VideoLayer> video_hw = -- VideoLayer::Create(&hw_frame_provider_, media::VIDEO_ROTATION_0); -- video_hw->SetBounds(gfx::Size(10, 10)); -- video_hw->SetIsDrawable(true); -- root->AddChild(video_hw); -- -- scoped_refptr<VideoLayer> video_scaled_hw = -- VideoLayer::Create(&scaled_hw_frame_provider_, media::VIDEO_ROTATION_0); -- video_scaled_hw->SetBounds(gfx::Size(10, 10)); -- video_scaled_hw->SetIsDrawable(true); -- root->AddChild(video_scaled_hw); -- -- color_video_frame_ = VideoFrame::CreateColorFrame( -- gfx::Size(4, 4), 0x80, 0x80, 0x80, base::TimeDelta()); -- hw_video_frame_ = VideoFrame::WrapNativeTexture( -- make_scoped_ptr( -- new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)), -- media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), -- gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4), base::TimeDelta(), false); -- scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture( -- make_scoped_ptr( -- new gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point)), -- media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), -- gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(), false); -- -- color_frame_provider_.set_frame(color_video_frame_); -- hw_frame_provider_.set_frame(hw_video_frame_); -- scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); -- - if (!delegating_renderer()) { - // TODO(danakj): IOSurface layer can not be transported. crbug.com/239335 - scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create(); -@@ -1119,14 +1077,6 @@ class LayerTreeHostContextTestDontUseLostResources - - void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { - LayerTreeHostContextTest::CommitCompleteOnThread(host_impl); -- -- if (host_impl->active_tree()->source_frame_number() == 3) { -- // On the third commit we're recovering from context loss. Hardware -- // video frames should not be reused by the VideoFrameProvider, but -- // software frames can be. -- hw_frame_provider_.set_frame(NULL); -- scaled_hw_frame_provider_.set_frame(NULL); -- } - } - - DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, -@@ -1175,14 +1125,6 @@ class LayerTreeHostContextTestDontUseLostResources - scoped_refptr<DelegatedFrameResourceCollection> - delegated_resource_collection_; - scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_; -- -- scoped_refptr<VideoFrame> color_video_frame_; -- scoped_refptr<VideoFrame> hw_video_frame_; -- scoped_refptr<VideoFrame> scaled_hw_video_frame_; -- -- FakeVideoFrameProvider color_frame_provider_; -- FakeVideoFrameProvider hw_frame_provider_; -- FakeVideoFrameProvider scaled_hw_frame_provider_; - }; - - SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources);
diff --git a/mojo/tools/roll/skia_build.patch b/mojo/tools/roll/skia_build.patch deleted file mode 100644 index 5340f2d..0000000 --- a/mojo/tools/roll/skia_build.patch +++ /dev/null
@@ -1,33 +0,0 @@ -diff --git a/skia/BUILD.gn b/skia/BUILD.gn -index 248bc1c..2357a7f 100644 ---- a/skia/BUILD.gn -+++ b/skia/BUILD.gn -@@ -12,18 +12,6 @@ if (current_cpu == "arm") { - skia_support_gpu = !is_ios - skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) - --# The list of Skia defines that are to be set for blink. --gypi_blink_skia_defines = -- exec_script("//build/gypi_to_gn.py", -- [ -- rebase_path( -- "//third_party/WebKit/public/blink_skia_config.gypi"), -- "--replace=<(skia_include_path)=//third_party/skia/include", -- "--replace=<(skia_src_path)=//third_party/skia/src", -- ], -- "scope", -- [ "//third_party/WebKit/public/blink_skia_config.gypi" ]) -- - # The list of Skia defines that are to be set for chromium. - gypi_skia_defines = - exec_script("//build/gypi_to_gn.py", -@@ -130,8 +118,7 @@ config("skia_config") { - "//third_party/skia/include/utils", - ] - -- defines = gypi_blink_skia_defines.blink_skia_defines -- defines += gypi_skia_defines.skia_for_chromium_defines -+ defines = gypi_skia_defines.skia_for_chromium_defines - - defines += [] -
diff --git a/mojo/tools/roll/third_party_khronos.patch b/mojo/tools/roll/third_party_khronos.patch deleted file mode 100644 index 36957f7..0000000 --- a/mojo/tools/roll/third_party_khronos.patch +++ /dev/null
@@ -1,13 +0,0 @@ -diff --git a/third_party/khronos/KHR/khrplatform.h b/third_party/khronos/KHR/khrplatform.h -index 026c9c7..ee062de 100644 ---- a/third_party/khronos/KHR/khrplatform.h -+++ b/third_party/khronos/KHR/khrplatform.h -@@ -124,7 +124,7 @@ - - #undef KHRONOS_APICALL - #if defined(GLES2_USE_MOJO) --#include "third_party/mojo/src/mojo/public/c/gles2/gles2_export.h" -+#include "mojo/public/c/gles2/gles2_export.h" - #define KHRONOS_APICALL MOJO_GLES2_EXPORT - #else - #include "gpu/command_buffer/client/gles2_c_lib_export.h"
diff --git a/mojo/tools/roll/ui_gl_init.patch b/mojo/tools/roll/ui_gl_init.patch deleted file mode 100644 index f44b61d..0000000 --- a/mojo/tools/roll/ui_gl_init.patch +++ /dev/null
@@ -1,36 +0,0 @@ -diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc -index e1369e5..f4cb61c 100644 ---- a/ui/gl/gl_surface.cc -+++ b/ui/gl/gl_surface.cc -@@ -28,7 +28,7 @@ base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leaky - } // namespace - - // static --bool GLSurface::InitializeOneOff() { -+bool GLSurface::InitializeOneOff(GLImplementation impl) { - DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); - - TRACE_EVENT0("gpu", "GLSurface::InitializeOneOff"); -@@ -40,7 +40,8 @@ bool GLSurface::InitializeOneOff() { - base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); - - // The default implementation is always the first one in list. -- GLImplementation impl = allowed_impls[0]; -+ if (impl == kGLImplementationNone) -+ impl = allowed_impls[0]; - bool fallback_to_osmesa = false; - if (cmd->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests)) { - impl = kGLImplementationOSMesaGL; -diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h -index 8993845..220bda6 100644 ---- a/ui/gl/gl_surface.h -+++ b/ui/gl/gl_surface.h -@@ -96,7 +96,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { - const SwapCompletionCallback& callback); - - // Initialize GL bindings. -- static bool InitializeOneOff(); -+ static bool InitializeOneOff(GLImplementation = kGLImplementationNone); - - // Unit tests should call these instead of InitializeOneOff() to set up - // GL bindings appropriate for tests.
diff --git a/mojo/tools/roll/update_from_chromium.py b/mojo/tools/roll/update_from_chromium.py index a901629..a4f0cf5 100755 --- a/mojo/tools/roll/update_from_chromium.py +++ b/mojo/tools/roll/update_from_chromium.py
@@ -15,69 +15,45 @@ import patch -# These directories are snapshotted from chromium without modifications. -dirs_to_snapshot = [ +# //base and its dependencies +base_deps = [ "base", - "build", - "cc", - "gpu", - "sandbox/linux", - "skia", "testing", - "third_party/android_testrunner", "third_party/ashmem", - "third_party/binutils", - "third_party/boringssl", - "third_party/brotli", - "third_party/checkstyle", - "third_party/cython", - "third_party/fontconfig", - "third_party/freetype2", - "third_party/harfbuzz-ng", - "third_party/iccjpeg", - "third_party/jinja2", - "third_party/jstemplate", - "third_party/khronos", - "third_party/libXNVCtrl", "third_party/libevent", - "third_party/libjpeg", - "third_party/libpng", - "third_party/libxml", - "third_party/markupsafe", - "third_party/mesa", + "third_party/libxml", # via //base/test "third_party/modp_b64", - "third_party/ots", - "third_party/ply", - "third_party/protobuf", - "third_party/pymock", - "third_party/qcms", - "third_party/re2", - "third_party/sfntly", - "third_party/smhasher", "third_party/tcmalloc", - "third_party/yasm", - "third_party/zlib", +] + +# //build and its dependencies +build_deps = [ + "build", + "third_party/android_testrunner", + "third_party/binutils", + "third_party/pymock", "tools/android", "tools/clang", - "tools/gdb", "tools/generate_library_loader", - "tools/git", "tools/gritsettings", - "tools/idl_parser", - "tools/json_comment_eater", - "tools/linux", - "tools/msan", - "tools/protoc_wrapper", "tools/relocation_packer", "tools/valgrind", - "tools/vim", - "tools/xdisplaycheck", - "url", - "ui/gl", - ] +] -files_to_copy = ["sandbox/sandbox_export.h", - ".clang-format"] +# //sandbox/linux and its dependencies +sandbox_deps = [ + "sandbox/linux", +] + +# things used from //mojo/public +mojo_sdk_deps = [ + "third_party/cython", +] + +# These directories are snapshotted from chromium without modifications. +dirs_to_snapshot = base_deps + build_deps + sandbox_deps + mojo_sdk_deps + +files_to_copy = [ "sandbox/sandbox_export.h" ] # The contents of these files before the roll will be preserved after the roll, # even though they live in directories rolled in from Chromium.
diff --git a/tools/json_comment_eater/everything.json b/tools/json_comment_eater/everything.json deleted file mode 100644 index 31db503..0000000 --- a/tools/json_comment_eater/everything.json +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 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. - -// Test API. -{ "namespace": "test", - "comments": "yo", // Comments all have a // in them. - "strings": "yes", // Comment with "strings" and " character - "escaped\"": "string\"isescaped", - "more//": "\"more", - "so\\many": "\\\\escapes\\\\\"whoa", - "comment//inmiddle": "of string" -}
diff --git a/tools/json_comment_eater/everything_expected.json b/tools/json_comment_eater/everything_expected.json deleted file mode 100644 index 3fa02c1..0000000 --- a/tools/json_comment_eater/everything_expected.json +++ /dev/null
@@ -1,13 +0,0 @@ - - - - - -{ "namespace": "test", - "comments": "yo", - "strings": "yes", - "escaped\"": "string\"isescaped", - "more//": "\"more", - "so\\many": "\\\\escapes\\\\\"whoa", - "comment//inmiddle": "of string" -}
diff --git a/tools/json_comment_eater/json_comment_eater.py b/tools/json_comment_eater/json_comment_eater.py deleted file mode 100755 index 93261bf..0000000 --- a/tools/json_comment_eater/json_comment_eater.py +++ /dev/null
@@ -1,72 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -'''Utility to remove comments from JSON files so that they can be parsed by -json.loads. -''' - -import sys - - -def _Rcount(string, chars): - '''Returns the number of consecutive characters from |chars| that occur at the - end of |string|. - ''' - return len(string) - len(string.rstrip(chars)) - - -def _FindNextToken(string, tokens, start): - '''Finds the next token in |tokens| that occurs in |string| from |start|. - Returns a tuple (index, token key). - ''' - min_index, min_key = (-1, None) - for k in tokens: - index = string.find(k, start) - if index != -1 and (min_index == -1 or index < min_index): - min_index, min_key = (index, k) - return (min_index, min_key) - - -def _ReadString(input, start, output): - output.append('"') - start_range, end_range = (start, input.find('"', start)) - # \" escapes the ", \\" doesn't, \\\" does, etc. - while (end_range != -1 and - _Rcount(input[start_range:end_range], '\\') % 2 == 1): - start_range, end_range = (end_range, input.find('"', end_range + 1)) - if end_range == -1: - return start_range + 1 - output.append(input[start:end_range + 1]) - return end_range + 1 - - -def _ReadComment(input, start, output): - eol_tokens = ('\n', '\r') - eol_token_index, eol_token = _FindNextToken(input, eol_tokens, start) - if eol_token is None: - return len(input) - output.append(eol_token) - return eol_token_index + len(eol_token) - - -def Nom(input): - token_actions = { - '"': _ReadString, - '//': _ReadComment, - } - output = [] - pos = 0 - while pos < len(input): - token_index, token = _FindNextToken(input, token_actions.keys(), pos) - if token is None: - output.append(input[pos:]) - break - output.append(input[pos:token_index]) - pos = token_actions[token](input, token_index + len(token), output) - return ''.join(output) - - -if __name__ == '__main__': - sys.stdout.write(Nom(sys.stdin.read()))
diff --git a/tools/json_comment_eater/json_comment_eater_test.py b/tools/json_comment_eater/json_comment_eater_test.py deleted file mode 100755 index 5a230eb..0000000 --- a/tools/json_comment_eater/json_comment_eater_test.py +++ /dev/null
@@ -1,26 +0,0 @@ -#!/usr/bin/env python -# Copyright 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. - -from json_comment_eater import Nom -import unittest - -class JsonCommentEaterTest(unittest.TestCase): - def _Load(self, test_name): - '''Loads the input and expected output for |test_name| as given by reading - in |test_name|.json and |test_name|_expected.json, and returns the string - contents as a tuple in that order. - ''' - def read(file_name): - with open(file_name, 'r') as f: - return f.read() - return [read(pattern % test_name) - for pattern in ('%s.json', '%s_expected.json')] - - def testEverything(self): - json, expected_json = self._Load('everything') - self.assertEqual(expected_json, Nom(json)) - -if __name__ == '__main__': - unittest.main()
diff --git a/tools/msan/blacklist.txt b/tools/msan/blacklist.txt deleted file mode 100644 index a00f740..0000000 --- a/tools/msan/blacklist.txt +++ /dev/null
@@ -1,28 +0,0 @@ -# The rules in this file are only applied at compile time. -# Because the Chrome buildsystem does not automatically touch the files -# mentioned here, changing this file requires clobbering all MSan bots. -# -# Please think twice before you add or remove these rules. - -# False positive in ffmpeg due to assembly code. http://crbug.com/344505 -fun:ff_get_cpu_flags_x86 - -# Benign uninits in zlib. -# http://crbug.com/116277 -fun:*MOZ_Z_deflate* -# http://crbug.com/418383 -fun:longest_match - -# Uninit in zlib with SIMD intrinsic http://crbug.com/426868 -fun:crc_fold512_to_32 - -# Uninit in OSMesa. http://crbug.com/347967 -fun:unpack_RGBA8888 -fun:unpack_RGB888 - -# False positives due to use of linux_syscall_support. http://crbug.com/394028 -src:*/breakpad/src/* -src:*/components/crash/app/breakpad_linux.cc - -# False positives due to an MSan bug. http://crbug.com/418986 -fun:*SchedGetParamThread*