diff --git a/DEPS b/DEPS index 09cd77e2..cbc27b78 100644 --- a/DEPS +++ b/DEPS
@@ -102,7 +102,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': 'd84b42c71a8122b7cd144474fd6d6aaa787f54e1', + 'pdfium_revision': '360edebb1889e16d5084f2a3081ffdcfc0f60efa', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling openmax_dl # and whatever else without interference from each other. @@ -327,7 +327,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '9fce213bdbb8512c571c6e14b0302dbb5ecd653e', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'aac382b3b65d5a2805c6467e1d9b359625569f91', # DevTools node modules. Used on Linux buildbots only. 'src/third_party/devtools-node-modules': {
diff --git a/android_webview/browser/aw_render_thread_context_provider.cc b/android_webview/browser/aw_render_thread_context_provider.cc index 6c6ac9b5..36ab732 100644 --- a/android_webview/browser/aw_render_thread_context_provider.cc +++ b/android_webview/browser/aw_render_thread_context_provider.cc
@@ -95,6 +95,14 @@ return GL_RGBA; } +void AwRenderThreadContextProvider::AddRef() const { + base::RefCountedThreadSafe<AwRenderThreadContextProvider>::AddRef(); +} + +void AwRenderThreadContextProvider::Release() const { + base::RefCountedThreadSafe<AwRenderThreadContextProvider>::Release(); +} + gpu::ContextResult AwRenderThreadContextProvider::BindToCurrentThread() { // This is called on the thread the context will be used. DCHECK(main_thread_checker_.CalledOnValidThread()); @@ -121,11 +129,6 @@ return context_->GetImplementation(); } -gpu::raster::RasterInterface* AwRenderThreadContextProvider::RasterContext() { - NOTIMPLEMENTED(); - return nullptr; -} - gpu::ContextSupport* AwRenderThreadContextProvider::ContextSupport() { DCHECK(main_thread_checker_.CalledOnValidThread());
diff --git a/android_webview/browser/aw_render_thread_context_provider.h b/android_webview/browser/aw_render_thread_context_provider.h index e2b2f3a..58a32e4 100644 --- a/android_webview/browser/aw_render_thread_context_provider.h +++ b/android_webview/browser/aw_render_thread_context_provider.h
@@ -30,7 +30,9 @@ namespace android_webview { -class AwRenderThreadContextProvider : public viz::ContextProvider { +class AwRenderThreadContextProvider + : public base::RefCountedThreadSafe<AwRenderThreadContextProvider>, + public viz::ContextProvider { public: static scoped_refptr<AwRenderThreadContextProvider> Create( scoped_refptr<gl::GLSurface> surface, @@ -40,18 +42,13 @@ // on the default framebuffer. uint32_t GetCopyTextureInternalFormat(); - private: - AwRenderThreadContextProvider( - scoped_refptr<gl::GLSurface> surface, - scoped_refptr<gpu::InProcessCommandBuffer::Service> service); - ~AwRenderThreadContextProvider() override; - - // viz::ContextProvider: + // viz::ContextProvider implementation. + void AddRef() const override; + void Release() const override; gpu::ContextResult BindToCurrentThread() override; const gpu::Capabilities& ContextCapabilities() const override; const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const override; gpu::gles2::GLES2Interface* ContextGL() override; - gpu::raster::RasterInterface* RasterContext() override; gpu::ContextSupport* ContextSupport() override; class GrContext* GrContext() override; viz::ContextCacheController* CacheController() override; @@ -60,6 +57,15 @@ void AddObserver(viz::ContextLostObserver* obs) override; void RemoveObserver(viz::ContextLostObserver* obs) override; + protected: + friend class base::RefCountedThreadSafe<AwRenderThreadContextProvider>; + + AwRenderThreadContextProvider( + scoped_refptr<gl::GLSurface> surface, + scoped_refptr<gpu::InProcessCommandBuffer::Service> service); + ~AwRenderThreadContextProvider() override; + + private: void OnLostContext(); base::ThreadChecker main_thread_checker_;
diff --git a/ash/shelf/login_shelf_view.cc b/ash/shelf/login_shelf_view.cc index 7f7e8c4..0ad840a 100644 --- a/ash/shelf/login_shelf_view.cc +++ b/ash/shelf/login_shelf_view.cc
@@ -153,6 +153,10 @@ UpdateUi(); } +const char* LoginShelfView::GetClassName() const { + return "LoginShelfView"; +} + void LoginShelfView::OnFocus() { LOG(WARNING) << "LoginShelfView was focused, but this should never happen. " "Forwarded focus to shelf widget with an unknown direction.";
diff --git a/ash/shelf/login_shelf_view.h b/ash/shelf/login_shelf_view.h index 44aee11..1fa6268 100644 --- a/ash/shelf/login_shelf_view.h +++ b/ash/shelf/login_shelf_view.h
@@ -52,6 +52,7 @@ void UpdateAfterSessionStateChange(session_manager::SessionState state); // views::View: + const char* GetClassName() const override; void OnFocus() override; void AboutToRequestFocusFromTabTraversal(bool reverse) override;
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc index ccb58e7..d9816d60 100644 --- a/cc/layers/heads_up_display_layer_impl.cc +++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -22,6 +22,7 @@ #include "cc/trees/layer_tree_host_impl.h" #include "cc/trees/layer_tree_impl.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" +#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/quads/texture_draw_quad.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "skia/ext/platform_canvas.h"
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc index e946142f..998ee16 100644 --- a/cc/layers/texture_layer_unittest.cc +++ b/cc/layers/texture_layer_unittest.cc
@@ -38,6 +38,7 @@ #include "cc/trees/layer_tree_impl.h" #include "cc/trees/single_thread_proxy.h" #include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "components/viz/common/resources/returned_resource.h" #include "components/viz/common/resources/transferable_resource.h" #include "components/viz/test/test_layer_tree_frame_sink.h" @@ -493,7 +494,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { constexpr bool disable_display_vsync = false; bool synchronous_composite = !HasImplThread() &&
diff --git a/cc/raster/gpu_raster_buffer_provider.cc b/cc/raster/gpu_raster_buffer_provider.cc index 75694d32..3b12a6c3 100644 --- a/cc/raster/gpu_raster_buffer_provider.cc +++ b/cc/raster/gpu_raster_buffer_provider.cc
@@ -19,6 +19,8 @@ #include "cc/raster/raster_source.h" #include "cc/raster/scoped_gpu_raster.h" #include "cc/resources/resource.h" +#include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "gpu/command_buffer/client/context_support.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "gpu/command_buffer/client/raster_interface.h" @@ -39,11 +41,11 @@ const gfx::Rect& playback_rect, const gfx::AxisTransform2d& transform, const RasterSource::PlaybackSettings& playback_settings, - viz::ContextProvider* context_provider, + viz::RasterContextProvider* context_provider, ResourceProvider::ScopedWriteLockRaster* resource_lock, bool use_distance_field_text, int msaa_sample_count) { - gpu::raster::RasterInterface* ri = context_provider->RasterContext(); + gpu::raster::RasterInterface* ri = context_provider->RasterInterface(); GLuint texture_id = resource_lock->ConsumeTexture(ri); ri->BeginRasterCHROMIUM(texture_id, raster_source->background_color(), @@ -68,21 +70,21 @@ // SkCanvases with a GrContext on a RasterInterface enabled context. class ScopedGrContextAccess { public: - explicit ScopedGrContextAccess(viz::ContextProvider* context_provider) + explicit ScopedGrContextAccess(viz::RasterContextProvider* context_provider) : context_provider_(context_provider) { - gpu::raster::RasterInterface* ri = context_provider_->RasterContext(); + gpu::raster::RasterInterface* ri = context_provider_->RasterInterface(); ri->BeginGpuRaster(); class GrContext* gr_context = context_provider_->GrContext(); gr_context->resetContext(); } ~ScopedGrContextAccess() { - gpu::raster::RasterInterface* ri = context_provider_->RasterContext(); + gpu::raster::RasterInterface* ri = context_provider_->RasterInterface(); ri->EndGpuRaster(); } private: - viz::ContextProvider* context_provider_; + viz::RasterContextProvider* context_provider_; }; static void RasterizeSource( @@ -93,13 +95,13 @@ const gfx::Rect& playback_rect, const gfx::AxisTransform2d& transform, const RasterSource::PlaybackSettings& playback_settings, - viz::ContextProvider* context_provider, + viz::RasterContextProvider* context_provider, ResourceProvider::ScopedWriteLockRaster* resource_lock, bool use_distance_field_text, int msaa_sample_count) { ScopedGrContextAccess gr_context_access(context_provider); - gpu::raster::RasterInterface* ri = context_provider->RasterContext(); + gpu::raster::RasterInterface* ri = context_provider->RasterInterface(); GLuint texture_id = resource_lock->ConsumeTexture(ri); { @@ -165,7 +167,7 @@ GpuRasterBufferProvider::GpuRasterBufferProvider( viz::ContextProvider* compositor_context_provider, - viz::ContextProvider* worker_context_provider, + viz::RasterContextProvider* worker_context_provider, LayerTreeResourceProvider* resource_provider, bool use_distance_field_text, int gpu_rasterization_msaa_sample_count, @@ -296,9 +298,9 @@ uint64_t new_content_id, const gfx::AxisTransform2d& transform, const RasterSource::PlaybackSettings& playback_settings) { - viz::ContextProvider::ScopedContextLock scoped_context( + viz::RasterContextProvider::ScopedRasterContextLock scoped_context( worker_context_provider_); - gpu::raster::RasterInterface* ri = scoped_context.RasterContext(); + gpu::raster::RasterInterface* ri = scoped_context.RasterInterface(); DCHECK(ri); // Synchronize with compositor. Nop if sync token is empty.
diff --git a/cc/raster/gpu_raster_buffer_provider.h b/cc/raster/gpu_raster_buffer_provider.h index 57d75fba5..c3e9b6b 100644 --- a/cc/raster/gpu_raster_buffer_provider.h +++ b/cc/raster/gpu_raster_buffer_provider.h
@@ -14,14 +14,15 @@ namespace viz { class ContextProvider; -} +class RasterContextProvider; +} // namespace viz namespace cc { class CC_EXPORT GpuRasterBufferProvider : public RasterBufferProvider { public: GpuRasterBufferProvider(viz::ContextProvider* compositor_context_provider, - viz::ContextProvider* worker_context_provider, + viz::RasterContextProvider* worker_context_provider, LayerTreeResourceProvider* resource_provider, bool use_distance_field_text, int gpu_rasterization_msaa_sample_count, @@ -91,7 +92,7 @@ }; viz::ContextProvider* const compositor_context_provider_; - viz::ContextProvider* const worker_context_provider_; + viz::RasterContextProvider* const worker_context_provider_; LayerTreeResourceProvider* const resource_provider_; const bool use_distance_field_text_; const int msaa_sample_count_;
diff --git a/cc/raster/one_copy_raster_buffer_provider.cc b/cc/raster/one_copy_raster_buffer_provider.cc index ea3487eb..821eff2f4 100644 --- a/cc/raster/one_copy_raster_buffer_provider.cc +++ b/cc/raster/one_copy_raster_buffer_provider.cc
@@ -18,6 +18,8 @@ #include "cc/base/math_util.h" #include "cc/resources/resource_util.h" #include "cc/resources/scoped_resource.h" +#include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "components/viz/common/resources/platform_color.h" #include "components/viz/common/resources/resource_format.h" #include "gpu/GLES2/gl2extchromium.h" @@ -70,7 +72,7 @@ OneCopyRasterBufferProvider::OneCopyRasterBufferProvider( base::SequencedTaskRunner* task_runner, viz::ContextProvider* compositor_context_provider, - viz::ContextProvider* worker_context_provider, + viz::RasterContextProvider* worker_context_provider, LayerTreeResourceProvider* resource_provider, int max_copy_texture_chromium_size, bool use_partial_raster, @@ -229,9 +231,9 @@ void OneCopyRasterBufferProvider::WaitSyncToken( const gpu::SyncToken& sync_token) { - viz::ContextProvider::ScopedContextLock scoped_context( + viz::RasterContextProvider::ScopedRasterContextLock scoped_context( worker_context_provider_); - gpu::raster::RasterInterface* ri = scoped_context.RasterContext(); + gpu::raster::RasterInterface* ri = scoped_context.RasterInterface(); DCHECK(ri); // Synchronize with compositor. Nop if sync token is empty. ri->WaitSyncTokenCHROMIUM(sync_token.GetConstData()); @@ -304,9 +306,9 @@ ResourceProvider::ScopedWriteLockRaster* resource_lock, const RasterSource* raster_source, const gfx::Rect& rect_to_copy) { - viz::ContextProvider::ScopedContextLock scoped_context( + viz::RasterContextProvider::ScopedRasterContextLock scoped_context( worker_context_provider_); - gpu::raster::RasterInterface* ri = scoped_context.RasterContext(); + gpu::raster::RasterInterface* ri = scoped_context.RasterInterface(); DCHECK(ri); GLuint texture_id = resource_lock->ConsumeTexture(ri);
diff --git a/cc/raster/one_copy_raster_buffer_provider.h b/cc/raster/one_copy_raster_buffer_provider.h index 14b41721e..c9ceaae6 100644 --- a/cc/raster/one_copy_raster_buffer_provider.h +++ b/cc/raster/one_copy_raster_buffer_provider.h
@@ -11,24 +11,29 @@ #include "cc/raster/raster_buffer_provider.h" #include "cc/raster/staging_buffer_pool.h" #include "cc/resources/layer_tree_resource_provider.h" -#include "components/viz/common/gpu/context_provider.h" #include "gpu/command_buffer/common/sync_token.h" +namespace viz { +class ContextProvider; +class RasterContextProvider; +} // namespace viz + namespace cc { struct StagingBuffer; class StagingBufferPool; class CC_EXPORT OneCopyRasterBufferProvider : public RasterBufferProvider { public: - OneCopyRasterBufferProvider(base::SequencedTaskRunner* task_runner, - viz::ContextProvider* compositor_context_provider, - viz::ContextProvider* worker_context_provider, - LayerTreeResourceProvider* resource_provider, - int max_copy_texture_chromium_size, - bool use_partial_raster, - int max_staging_buffer_usage_in_bytes, - viz::ResourceFormat preferred_tile_format, - bool async_worker_context_enabled); + OneCopyRasterBufferProvider( + base::SequencedTaskRunner* task_runner, + viz::ContextProvider* compositor_context_provider, + viz::RasterContextProvider* worker_context_provider, + LayerTreeResourceProvider* resource_provider, + int max_copy_texture_chromium_size, + bool use_partial_raster, + int max_staging_buffer_usage_in_bytes, + viz::ResourceFormat preferred_tile_format, + bool async_worker_context_enabled); ~OneCopyRasterBufferProvider() override; // Overridden from RasterBufferProvider: @@ -114,7 +119,7 @@ gfx::BufferUsage StagingBufferUsage() const; viz::ContextProvider* const compositor_context_provider_; - viz::ContextProvider* const worker_context_provider_; + viz::RasterContextProvider* const worker_context_provider_; LayerTreeResourceProvider* const resource_provider_; const int max_bytes_per_copy_operation_; const bool use_partial_raster_;
diff --git a/cc/raster/raster_buffer_provider_perftest.cc b/cc/raster/raster_buffer_provider_perftest.cc index 7877a52..66bad93 100644 --- a/cc/raster/raster_buffer_provider_perftest.cc +++ b/cc/raster/raster_buffer_provider_perftest.cc
@@ -79,7 +79,10 @@ } }; -class PerfContextProvider : public viz::ContextProvider { +class PerfContextProvider + : public base::RefCountedThreadSafe<PerfContextProvider>, + public viz::ContextProvider, + public viz::RasterContextProvider { public: PerfContextProvider() : context_gl_(new PerfGLES2Interface), @@ -90,6 +93,14 @@ context_gl_.get(), capabilities_); } + // viz::ContextProvider implementation. + void AddRef() const override { + base::RefCountedThreadSafe<PerfContextProvider>::AddRef(); + } + void Release() const override { + base::RefCountedThreadSafe<PerfContextProvider>::Release(); + } + gpu::ContextResult BindToCurrentThread() override { return gpu::ContextResult::kSuccess; } @@ -100,7 +111,7 @@ return gpu_feature_info_; } gpu::gles2::GLES2Interface* ContextGL() override { return context_gl_.get(); } - gpu::raster::RasterInterface* RasterContext() override { + gpu::raster::RasterInterface* RasterInterface() override { return raster_context_.get(); } gpu::ContextSupport* ContextSupport() override { return &support_; } @@ -125,6 +136,8 @@ void RemoveObserver(viz::ContextLostObserver* obs) override {} private: + friend class base::RefCountedThreadSafe<PerfContextProvider>; + ~PerfContextProvider() override = default; std::unique_ptr<PerfGLES2Interface> context_gl_; @@ -314,7 +327,7 @@ protected: scoped_refptr<viz::ContextProvider> compositor_context_provider_; - scoped_refptr<viz::ContextProvider> worker_context_provider_; + scoped_refptr<viz::RasterContextProvider> worker_context_provider_; std::unique_ptr<LayerTreeResourceProvider> resource_provider_; scoped_refptr<base::TestSimpleTaskRunner> task_runner_; std::unique_ptr<SynchronousTaskGraphRunner> task_graph_runner_;
diff --git a/cc/raster/raster_buffer_provider_unittest.cc b/cc/raster/raster_buffer_provider_unittest.cc index 7cde8ce..c0e7c2e 100644 --- a/cc/raster/raster_buffer_provider_unittest.cc +++ b/cc/raster/raster_buffer_provider_unittest.cc
@@ -38,6 +38,7 @@ #include "components/viz/common/resources/platform_color.h" #include "components/viz/test/test_gpu_memory_buffer_manager.h" #include "gpu/GLES2/gl2extchromium.h" +#include "gpu/command_buffer/client/raster_interface.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/axis_transform2d.h" @@ -286,6 +287,15 @@ context_provider->ContextGL()->Flush(); } + void LoseContext(viz::RasterContextProvider* context_provider) { + if (!context_provider) + return; + viz::RasterContextProvider::ScopedRasterContextLock lock(context_provider); + context_provider->RasterInterface()->LoseContextCHROMIUM( + GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB); + context_provider->RasterInterface()->Flush(); + } + void OnRasterTaskCompleted(unsigned id, bool was_canceled) override { RasterTaskResult result; result.id = id; @@ -386,8 +396,9 @@ } TEST_P(RasterBufferProviderTest, LostContext) { - LoseContext(context_provider_.get()); - LoseContext(worker_context_provider_.get()); + LoseContext(static_cast<viz::ContextProvider*>(context_provider_.get())); + LoseContext( + static_cast<viz::RasterContextProvider*>(worker_context_provider_.get())); AppendTask(0u); AppendTask(1u);
diff --git a/cc/raster/scoped_gpu_raster.cc b/cc/raster/scoped_gpu_raster.cc index c388007..9c0752c 100644 --- a/cc/raster/scoped_gpu_raster.cc +++ b/cc/raster/scoped_gpu_raster.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "cc/raster/scoped_gpu_raster.h" +#include "components/viz/common/gpu/context_provider.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "third_party/khronos/GLES2/gl2.h" #include "third_party/khronos/GLES2/gl2ext.h"
diff --git a/cc/raster/scoped_gpu_raster.h b/cc/raster/scoped_gpu_raster.h index 90aca8d..9f4e0c84 100644 --- a/cc/raster/scoped_gpu_raster.h +++ b/cc/raster/scoped_gpu_raster.h
@@ -10,7 +10,10 @@ #include "base/logging.h" #include "base/macros.h" #include "cc/cc_export.h" -#include "components/viz/common/gpu/context_provider.h" + +namespace viz { +class ContextProvider; +} // namespace viz namespace cc {
diff --git a/cc/raster/staging_buffer_pool.cc b/cc/raster/staging_buffer_pool.cc index dd7c829..a6346f5 100644 --- a/cc/raster/staging_buffer_pool.cc +++ b/cc/raster/staging_buffer_pool.cc
@@ -13,6 +13,7 @@ #include "base/trace_event/memory_dump_manager.h" #include "cc/base/container_util.h" #include "cc/resources/scoped_resource.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "gpu/command_buffer/client/raster_interface.h" using base::trace_event::MemoryAllocatorDump; @@ -127,7 +128,7 @@ StagingBufferPool::StagingBufferPool( base::SequencedTaskRunner* task_runner, - viz::ContextProvider* worker_context_provider, + viz::RasterContextProvider* worker_context_provider, ResourceProvider* resource_provider, bool use_partial_raster, int max_staging_buffer_usage_in_bytes) @@ -251,10 +252,10 @@ std::unique_ptr<StagingBuffer> staging_buffer; - viz::ContextProvider::ScopedContextLock scoped_context( + viz::RasterContextProvider::ScopedRasterContextLock scoped_context( worker_context_provider_); - gpu::raster::RasterInterface* ri = scoped_context.RasterContext(); + gpu::raster::RasterInterface* ri = scoped_context.RasterInterface(); DCHECK(ri); // Check if any busy buffers have become available. @@ -398,10 +399,10 @@ lock_.AssertAcquired(); { - viz::ContextProvider::ScopedContextLock scoped_context( + viz::RasterContextProvider::ScopedRasterContextLock scoped_context( worker_context_provider_); - gpu::raster::RasterInterface* ri = scoped_context.RasterContext(); + gpu::raster::RasterInterface* ri = scoped_context.RasterInterface(); DCHECK(ri); // Note: Front buffer is guaranteed to be LRU so we can stop releasing
diff --git a/cc/raster/staging_buffer_pool.h b/cc/raster/staging_buffer_pool.h index 34f5140..72b55f4 100644 --- a/cc/raster/staging_buffer_pool.h +++ b/cc/raster/staging_buffer_pool.h
@@ -19,13 +19,16 @@ #include "base/trace_event/memory_dump_provider.h" #include "base/trace_event/trace_event.h" #include "cc/resources/resource_provider.h" -#include "components/viz/common/gpu/context_provider.h" namespace gpu { namespace raster { class RasterInterface; } -} +} // namespace gpu + +namespace viz { +class RasterContextProvider; +} // namespace viz namespace cc { class Resource; @@ -56,7 +59,7 @@ ~StagingBufferPool() final; StagingBufferPool(base::SequencedTaskRunner* task_runner, - viz::ContextProvider* worker_context_provider, + viz::RasterContextProvider* worker_context_provider, ResourceProvider* resource_provider, bool use_partial_raster, int max_staging_buffer_usage_in_bytes); @@ -92,7 +95,7 @@ void OnPurgeMemory() override; scoped_refptr<base::SequencedTaskRunner> task_runner_; - viz::ContextProvider* const worker_context_provider_; + viz::RasterContextProvider* const worker_context_provider_; ResourceProvider* const resource_provider_; const bool use_partial_raster_;
diff --git a/cc/resources/display_resource_provider.cc b/cc/resources/display_resource_provider.cc index b4df9e74..c80df4d4 100644 --- a/cc/resources/display_resource_provider.cc +++ b/cc/resources/display_resource_provider.cc
@@ -5,6 +5,7 @@ #include "cc/resources/display_resource_provider.h" #include "base/trace_event/trace_event.h" +#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/resources/resource_format_utils.h" #include "components/viz/common/resources/shared_bitmap_manager.h" #include "gpu/command_buffer/client/gles2_interface.h"
diff --git a/cc/resources/layer_tree_resource_provider.cc b/cc/resources/layer_tree_resource_provider.cc index 69a5a82b..67803bb 100644 --- a/cc/resources/layer_tree_resource_provider.cc +++ b/cc/resources/layer_tree_resource_provider.cc
@@ -6,6 +6,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" +#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/resources/resource_format_utils.h" #include "gpu/command_buffer/client/context_support.h" #include "gpu/command_buffer/client/gles2_interface.h"
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc index 4eaf66238..d05cf7f 100644 --- a/cc/resources/resource_provider.cc +++ b/cc/resources/resource_provider.cc
@@ -25,6 +25,7 @@ #include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "cc/resources/resource_util.h" +#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/resources/platform_color.h" #include "components/viz/common/resources/returned_resource.h" #include "components/viz/common/resources/shared_bitmap_manager.h"
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h index 268857f..4fbf80c0 100644 --- a/cc/resources/resource_provider.h +++ b/cc/resources/resource_provider.h
@@ -26,7 +26,6 @@ #include "cc/cc_export.h" #include "cc/resources/return_callback.h" #include "components/viz/common/display/renderer_settings.h" -#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/quads/shared_bitmap.h" #include "components/viz/common/resources/release_callback.h" #include "components/viz/common/resources/resource.h" @@ -51,7 +50,7 @@ namespace gpu { class GpuMemoryBufferManager; -namespace gles { +namespace gles2 { class GLES2Interface; } namespace raster { @@ -60,6 +59,7 @@ } namespace viz { +class ContextProvider; class SharedBitmapManager; } // namespace viz
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc index 9adc6a6..139088d 100644 --- a/cc/resources/resource_provider_unittest.cc +++ b/cc/resources/resource_provider_unittest.cc
@@ -3519,7 +3519,7 @@ kWidth, kHeight, 0, GLDataFormat(format), GLDataType(format), nullptr)); EXPECT_EQ(kWorkerTextureId, - lock.ConsumeTexture(context_provider->RasterContext())); + lock.ConsumeTexture(context_provider->RasterInterface())); Mock::VerifyAndClearExpectations(context); EXPECT_CALL(*context, RetireTextureId(kWorkerTextureId)); @@ -3536,14 +3536,14 @@ EXPECT_CALL(*context, createAndConsumeTextureCHROMIUM(_)) .WillOnce(Return(kWorkerTextureId)); EXPECT_EQ(kWorkerTextureId, - lock.ConsumeTexture(context_provider->RasterContext())); + lock.ConsumeTexture(context_provider->RasterInterface())); Mock::VerifyAndClearExpectations(context); EXPECT_CALL(*context, RetireTextureId(kWorkerTextureId)); context_provider->ContextGL()->DeleteTextures(1, &kWorkerTextureId); sync_token = ResourceProvider::GenerateSyncTokenHelper( - context_provider->RasterContext()); + context_provider->RasterInterface()); lock.set_sync_token(sync_token); Mock::VerifyAndClearExpectations(context); } @@ -3604,7 +3604,7 @@ GL_SCANOUT_CHROMIUM, kWidth, kHeight)); EXPECT_EQ(kWorkerTextureId, - lock.ConsumeTexture(context_provider->RasterContext())); + lock.ConsumeTexture(context_provider->RasterInterface())); Mock::VerifyAndClearExpectations(context); EXPECT_CALL(*context, RetireTextureId(kWorkerTextureId)); @@ -3621,11 +3621,11 @@ EXPECT_CALL(*context, createAndConsumeTextureCHROMIUM(_)) .WillOnce(Return(kWorkerTextureId)); EXPECT_EQ(kWorkerTextureId, - lock.ConsumeTexture(context_provider->RasterContext())); + lock.ConsumeTexture(context_provider->RasterInterface())); Mock::VerifyAndClearExpectations(context); sync_token = ResourceProvider::GenerateSyncTokenHelper( - context_provider->RasterContext()); + context_provider->RasterInterface()); lock.set_sync_token(sync_token); EXPECT_CALL(*context, RetireTextureId(kWorkerTextureId));
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc index 3ac6ed9..3d440f7 100644 --- a/cc/resources/video_resource_updater.cc +++ b/cc/resources/video_resource_updater.cc
@@ -16,6 +16,7 @@ #include "cc/paint/skia_paint_canvas.h" #include "cc/resources/layer_tree_resource_provider.h" #include "cc/resources/resource_util.h" +#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/quads/render_pass.h" #include "components/viz/common/quads/stream_video_draw_quad.h" #include "components/viz/common/quads/texture_draw_quad.h"
diff --git a/cc/test/fake_layer_tree_frame_sink.cc b/cc/test/fake_layer_tree_frame_sink.cc index a3207b5b..ee156cb 100644 --- a/cc/test/fake_layer_tree_frame_sink.cc +++ b/cc/test/fake_layer_tree_frame_sink.cc
@@ -32,7 +32,7 @@ FakeLayerTreeFrameSink::FakeLayerTreeFrameSink( scoped_refptr<viz::ContextProvider> context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) + scoped_refptr<viz::RasterContextProvider> worker_context_provider) : LayerTreeFrameSink(std::move(context_provider), std::move(worker_context_provider), base::ThreadTaskRunnerHandle::Get(),
diff --git a/cc/test/fake_layer_tree_frame_sink.h b/cc/test/fake_layer_tree_frame_sink.h index 536c05f..201e50b 100644 --- a/cc/test/fake_layer_tree_frame_sink.h +++ b/cc/test/fake_layer_tree_frame_sink.h
@@ -119,7 +119,7 @@ protected: FakeLayerTreeFrameSink( scoped_refptr<viz::ContextProvider> context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider); + scoped_refptr<viz::RasterContextProvider> worker_context_provider); viz::TestGpuMemoryBufferManager test_gpu_memory_buffer_manager_; TestSharedBitmapManager test_shared_bitmap_manager_;
diff --git a/cc/test/layer_tree_pixel_resource_test.cc b/cc/test/layer_tree_pixel_resource_test.cc index 255600c..1337f86 100644 --- a/cc/test/layer_tree_pixel_resource_test.cc +++ b/cc/test/layer_tree_pixel_resource_test.cc
@@ -47,7 +47,7 @@ viz::ContextProvider* compositor_context_provider = host_impl->layer_tree_frame_sink()->context_provider(); - viz::ContextProvider* worker_context_provider = + viz::RasterContextProvider* worker_context_provider = host_impl->layer_tree_frame_sink()->worker_context_provider(); LayerTreeResourceProvider* resource_provider = host_impl->resource_provider(); int max_bytes_per_copy_operation = 1024 * 1024;
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc index 11c9484d..eb7e641 100644 --- a/cc/test/layer_tree_pixel_test.cc +++ b/cc/test/layer_tree_pixel_test.cc
@@ -42,7 +42,7 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider>, - scoped_refptr<viz::ContextProvider>) { + scoped_refptr<viz::RasterContextProvider>) { scoped_refptr<TestInProcessContextProvider> compositor_context_provider; scoped_refptr<TestInProcessContextProvider> worker_context_provider; if (test_type_ == PIXEL_TEST_GL) { @@ -56,7 +56,7 @@ !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; auto delegating_output_surface = std::make_unique<viz::TestLayerTreeFrameSink>( - compositor_context_provider, std::move(worker_context_provider), + compositor_context_provider, worker_context_provider, shared_bitmap_manager(), gpu_memory_buffer_manager(), renderer_settings, ImplThreadTaskRunner(), synchronous_composite, disable_display_vsync, refresh_rate);
diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h index 7363703..fe2e75d 100644 --- a/cc/test/layer_tree_pixel_test.h +++ b/cc/test/layer_tree_pixel_test.h
@@ -42,7 +42,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override; + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override; std::unique_ptr<viz::OutputSurface> CreateDisplayOutputSurfaceOnThread( scoped_refptr<viz::ContextProvider> compositor_context_provider) override;
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index 214b98a..507adf0b 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc
@@ -46,7 +46,7 @@ public: SynchronousLayerTreeFrameSink( scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, viz::SharedBitmapManager* shared_bitmap_manager, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, const viz::RendererSettings& renderer_settings, @@ -967,7 +967,7 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) { constexpr bool disable_display_vsync = false; bool synchronous_composite = !HasImplThread() &&
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h index 59686cc..6f2bfa35 100644 --- a/cc/test/layer_tree_test.h +++ b/cc/test/layer_tree_test.h
@@ -145,7 +145,7 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider); + scoped_refptr<viz::RasterContextProvider> worker_context_provider); // Override this and call the base class to change what viz::ContextProvider // will be used, such as to prevent sharing the context with the // LayerTreeFrameSink. Or override it and create your own OutputSurface to
diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc index 628968f..367888f 100644 --- a/cc/test/test_context_provider.cc +++ b/cc/test/test_context_provider.cc
@@ -207,6 +207,14 @@ context_thread_checker_.CalledOnValidThread()); } +void TestContextProvider::AddRef() const { + base::RefCountedThreadSafe<TestContextProvider>::AddRef(); +} + +void TestContextProvider::Release() const { + base::RefCountedThreadSafe<TestContextProvider>::Release(); +} + gpu::ContextResult TestContextProvider::BindToCurrentThread() { // This is called on the thread the context will be used. DCHECK(context_thread_checker_.CalledOnValidThread()); @@ -242,7 +250,7 @@ return context_gl_.get(); } -gpu::raster::RasterInterface* TestContextProvider::RasterContext() { +gpu::raster::RasterInterface* TestContextProvider::RasterInterface() { return raster_context_.get(); }
diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h index 209ae66e..196826d 100644 --- a/cc/test/test_context_provider.h +++ b/cc/test/test_context_provider.h
@@ -18,6 +18,7 @@ #include "base/threading/thread_checker.h" #include "cc/test/test_context_support.h" #include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "gpu/command_buffer/client/gles2_interface_stub.h" #include "gpu/config/gpu_feature_info.h" #include "third_party/skia/include/core/SkRefCnt.h" @@ -30,7 +31,10 @@ class TestWebGraphicsContext3D; class TestGLES2Interface; -class TestContextProvider : public viz::ContextProvider { +class TestContextProvider + : public base::RefCountedThreadSafe<TestContextProvider>, + public viz::ContextProvider, + public viz::RasterContextProvider { public: typedef base::Callback<std::unique_ptr<TestWebGraphicsContext3D>(void)> CreateCallback; @@ -50,11 +54,14 @@ static scoped_refptr<TestContextProvider> Create( std::unique_ptr<TestGLES2Interface> gl); + // viz::ContextProvider / viz::RasterContextProvider implementation. + void AddRef() const override; + void Release() const override; gpu::ContextResult BindToCurrentThread() override; const gpu::Capabilities& ContextCapabilities() const override; const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const override; gpu::gles2::GLES2Interface* ContextGL() override; - gpu::raster::RasterInterface* RasterContext() override; + gpu::raster::RasterInterface* RasterInterface() override; gpu::ContextSupport* ContextSupport() override; class GrContext* GrContext() override; viz::ContextCacheController* CacheController() override; @@ -75,6 +82,8 @@ TestContextSupport* support() { return support_.get(); } protected: + friend class base::RefCountedThreadSafe<TestContextProvider>; + explicit TestContextProvider( std::unique_ptr<TestContextSupport> support, std::unique_ptr<TestGLES2Interface> gl,
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc index 80c5113f..1a997eb 100644 --- a/cc/test/test_in_process_context_provider.cc +++ b/cc/test/test_in_process_context_provider.cc
@@ -86,6 +86,14 @@ TestInProcessContextProvider::~TestInProcessContextProvider() = default; +void TestInProcessContextProvider::AddRef() const { + base::RefCountedThreadSafe<TestInProcessContextProvider>::AddRef(); +} + +void TestInProcessContextProvider::Release() const { + base::RefCountedThreadSafe<TestInProcessContextProvider>::Release(); +} + gpu::ContextResult TestInProcessContextProvider::BindToCurrentThread() { return gpu::ContextResult::kSuccess; } @@ -94,7 +102,7 @@ return context_->GetImplementation(); } -gpu::raster::RasterInterface* TestInProcessContextProvider::RasterContext() { +gpu::raster::RasterInterface* TestInProcessContextProvider::RasterInterface() { return raster_context_.get(); }
diff --git a/cc/test/test_in_process_context_provider.h b/cc/test/test_in_process_context_provider.h index 082755b..5fc2128 100644 --- a/cc/test/test_in_process_context_provider.h +++ b/cc/test/test_in_process_context_provider.h
@@ -13,6 +13,7 @@ #include "base/synchronization/lock.h" #include "cc/test/test_image_factory.h" #include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "components/viz/test/test_gpu_memory_buffer_manager.h" #include "gpu/config/gpu_feature_info.h" @@ -35,14 +36,20 @@ gpu::GLInProcessContext* shared_context, scoped_refptr<base::SingleThreadTaskRunner> task_runner); -class TestInProcessContextProvider : public viz::ContextProvider { +class TestInProcessContextProvider + : public base::RefCountedThreadSafe<TestInProcessContextProvider>, + public viz::ContextProvider, + public viz::RasterContextProvider { public: explicit TestInProcessContextProvider( TestInProcessContextProvider* shared_context); + // viz::ContextProvider / viz::RasterContextProvider implementation. + void AddRef() const override; + void Release() const override; gpu::ContextResult BindToCurrentThread() override; gpu::gles2::GLES2Interface* ContextGL() override; - gpu::raster::RasterInterface* RasterContext() override; + gpu::raster::RasterInterface* RasterInterface() override; gpu::ContextSupport* ContextSupport() override; class GrContext* GrContext() override; viz::ContextCacheController* CacheController() override;
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h index 06e020aa..08fcc52 100644 --- a/cc/test/test_web_graphics_context_3d.h +++ b/cc/test/test_web_graphics_context_3d.h
@@ -22,7 +22,7 @@ #include "base/synchronization/lock.h" #include "cc/test/ordered_texture_map.h" #include "cc/test/test_texture.h" -#include "components/viz/common/gpu/context_provider.h" +#include "gpu/command_buffer/common/capabilities.h" #include "gpu/command_buffer/common/sync_token.h" #include "third_party/khronos/GLES2/gl2.h" #include "ui/gfx/geometry/rect.h"
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc index f7721fe0..c6d170b0 100644 --- a/cc/tiles/gpu_image_decode_cache.cc +++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -21,7 +21,7 @@ #include "cc/base/histograms.h" #include "cc/raster/tile_task.h" #include "cc/tiles/mipmap_util.h" -#include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "gpu/command_buffer/client/context_support.h" #include "gpu/command_buffer/client/raster_interface.h" #include "gpu_image_decode_cache.h" @@ -461,7 +461,7 @@ DCHECK(!upload.image()); } -GpuImageDecodeCache::GpuImageDecodeCache(viz::ContextProvider* context, +GpuImageDecodeCache::GpuImageDecodeCache(viz::RasterContextProvider* context, SkColorType color_type, size_t max_working_set_bytes) : color_type_(color_type), @@ -471,7 +471,7 @@ // Acquire the context_lock so that we can safely retrieve the // GrContextThreadSafeProxy. This proxy can then be used with no lock held. { - viz::ContextProvider::ScopedContextLock context_lock(context_); + viz::RasterContextProvider::ScopedRasterContextLock context_lock(context_); context_threadsafe_proxy_ = sk_sp<GrContextThreadSafeProxy>( context_->GrContext()->threadSafeProxy()); } @@ -708,7 +708,7 @@ "GpuImageDecodeCache::SetShouldAggressivelyFreeResources", "agressive_free_resources", aggressively_free_resources); if (aggressively_free_resources) { - viz::ContextProvider::ScopedContextLock context_lock(context_); + viz::RasterContextProvider::ScopedRasterContextLock context_lock(context_); base::AutoLock lock(lock_); aggressively_freeing_resources_ = aggressively_free_resources; EnsureCapacity(0); @@ -854,7 +854,7 @@ void GpuImageDecodeCache::UploadImage(const DrawImage& draw_image) { TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug"), "GpuImageDecodeCache::UploadImage"); - viz::ContextProvider::ScopedContextLock context_lock(context_); + viz::RasterContextProvider::ScopedRasterContextLock context_lock(context_); base::AutoLock lock(lock_); ImageData* image_data = GetImageDataForDrawImage(draw_image); DCHECK(image_data); @@ -1337,7 +1337,7 @@ if (image_data->mode == DecodedDataMode::GPU) { // Notify the discardable system of this image so it will count against // budgets. - context_->RasterContext()->InitializeDiscardableTextureCHROMIUM( + context_->RasterInterface()->InitializeDiscardableTextureCHROMIUM( image_data->upload.gl_id()); } } @@ -1408,15 +1408,16 @@ images_pending_complete_lock_.clear(); for (auto* image : images_pending_unlock_) { - context_->RasterContext()->UnlockDiscardableTextureCHROMIUM( + context_->RasterInterface()->UnlockDiscardableTextureCHROMIUM( GlIdFromSkImage(image)); } images_pending_unlock_.clear(); for (auto& image : images_pending_deletion_) { uint32_t texture_id = GlIdFromSkImage(image.get()); - if (context_->RasterContext()->LockDiscardableTextureCHROMIUM(texture_id)) { - context_->RasterContext()->DeleteTextures(1, &texture_id); + if (context_->RasterInterface()->LockDiscardableTextureCHROMIUM( + texture_id)) { + context_->RasterInterface()->DeleteTextures(1, &texture_id); } } images_pending_deletion_.clear(); @@ -1439,7 +1440,7 @@ return true; if (have_context_lock == HaveContextLock::kYes && - context_->RasterContext()->LockDiscardableTextureCHROMIUM( + context_->RasterInterface()->LockDiscardableTextureCHROMIUM( data->upload.gl_id())) { // If |have_context_lock|, we can immediately lock the image and send // the lock command to the GPU process.
diff --git a/cc/tiles/gpu_image_decode_cache.h b/cc/tiles/gpu_image_decode_cache.h index dafc5abf..d1f51a4 100644 --- a/cc/tiles/gpu_image_decode_cache.h +++ b/cc/tiles/gpu_image_decode_cache.h
@@ -20,7 +20,7 @@ #include "third_party/skia/include/gpu/gl/GrGLTypes.h" namespace viz { -class ContextProvider; +class RasterContextProvider; } namespace cc { @@ -102,7 +102,7 @@ public: enum class DecodeTaskType { PART_OF_UPLOAD_TASK, STAND_ALONE_DECODE_TASK }; - explicit GpuImageDecodeCache(viz::ContextProvider* context, + explicit GpuImageDecodeCache(viz::RasterContextProvider* context, SkColorType color_type, size_t max_working_set_bytes); ~GpuImageDecodeCache() override; @@ -372,7 +372,7 @@ void RunPendingContextThreadOperations(); const SkColorType color_type_; - viz::ContextProvider* context_; + viz::RasterContextProvider* context_; sk_sp<GrContextThreadSafeProxy> context_threadsafe_proxy_; // All members below this point must only be accessed while holding |lock_|.
diff --git a/cc/trees/layer_tree_frame_sink.cc b/cc/trees/layer_tree_frame_sink.cc index 3d905212..5c05114 100644 --- a/cc/trees/layer_tree_frame_sink.cc +++ b/cc/trees/layer_tree_frame_sink.cc
@@ -41,7 +41,7 @@ LayerTreeFrameSink::LayerTreeFrameSink( scoped_refptr<viz::ContextProvider> context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, viz::SharedBitmapManager* shared_bitmap_manager) @@ -87,10 +87,9 @@ DCHECK(context_provider_); DCHECK(compositor_task_runner_); DCHECK(compositor_task_runner_->BelongsToCurrentThread()); - viz::ContextProvider::ScopedContextLock lock( + viz::RasterContextProvider::ScopedRasterContextLock lock( worker_context_provider_.get()); - if (worker_context_provider_->RasterContext() - ->GetGraphicsResetStatusKHR() != GL_NO_ERROR) { + if (lock.RasterInterface()->GetGraphicsResetStatusKHR() != GL_NO_ERROR) { context_provider_->RemoveObserver(this); context_provider_ = nullptr; return false; @@ -123,7 +122,7 @@ } if (worker_context_provider_) { - viz::ContextProvider::ScopedContextLock lock( + viz::RasterContextProvider::ScopedRasterContextLock lock( worker_context_provider_.get()); worker_context_provider_->RemoveObserver( worker_context_lost_forwarder_.get());
diff --git a/cc/trees/layer_tree_frame_sink.h b/cc/trees/layer_tree_frame_sink.h index b637bc4..ac9fe419 100644 --- a/cc/trees/layer_tree_frame_sink.h +++ b/cc/trees/layer_tree_frame_sink.h
@@ -15,6 +15,7 @@ #include "cc/cc_export.h" #include "components/viz/common/gpu/context_lost_observer.h" #include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "components/viz/common/gpu/vulkan_context_provider.h" #include "components/viz/common/resources/returned_resource.h" #include "gpu/command_buffer/common/texture_in_use_response.h" @@ -69,7 +70,7 @@ // (won't be used) unless |context_provider| is present. LayerTreeFrameSink( scoped_refptr<viz::ContextProvider> context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, viz::SharedBitmapManager* shared_bitmap_manager); @@ -104,7 +105,7 @@ viz::ContextProvider* context_provider() const { return context_provider_.get(); } - viz::ContextProvider* worker_context_provider() const { + viz::RasterContextProvider* worker_context_provider() const { return worker_context_provider_.get(); } viz::VulkanContextProvider* vulkan_context_provider() const { @@ -145,7 +146,7 @@ struct LayerTreeFrameSink::Capabilities capabilities_; scoped_refptr<viz::ContextProvider> context_provider_; - scoped_refptr<viz::ContextProvider> worker_context_provider_; + scoped_refptr<viz::RasterContextProvider> worker_context_provider_; scoped_refptr<viz::VulkanContextProvider> vulkan_context_provider_; scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
diff --git a/cc/trees/layer_tree_frame_sink_client.h b/cc/trees/layer_tree_frame_sink_client.h index e2ca7ba..a463b77 100644 --- a/cc/trees/layer_tree_frame_sink_client.h +++ b/cc/trees/layer_tree_frame_sink_client.h
@@ -9,7 +9,6 @@ #include "base/memory/ref_counted.h" #include "base/time/time.h" #include "cc/cc_export.h" -#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/resources/returned_resource.h" #include "gpu/command_buffer/common/texture_in_use_response.h" #include "ui/gfx/geometry/rect.h"
diff --git a/cc/trees/layer_tree_frame_sink_unittest.cc b/cc/trees/layer_tree_frame_sink_unittest.cc index be1a0327..cf41eb3 100644 --- a/cc/trees/layer_tree_frame_sink_unittest.cc +++ b/cc/trees/layer_tree_frame_sink_unittest.cc
@@ -11,6 +11,7 @@ #include "cc/test/test_web_graphics_context_3d.h" #include "components/viz/common/quads/compositor_frame.h" #include "gpu/GLES2/gl2extchromium.h" +#include "gpu/command_buffer/client/raster_interface.h" #include "testing/gtest/include/gtest/gtest.h" namespace cc { @@ -19,8 +20,8 @@ class TestLayerTreeFrameSink : public LayerTreeFrameSink { public: explicit TestLayerTreeFrameSink( - scoped_refptr<TestContextProvider> context_provider, - scoped_refptr<TestContextProvider> worker_context_provider, + scoped_refptr<viz::ContextProvider> context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner) : LayerTreeFrameSink(std::move(context_provider), std::move(worker_context_provider), @@ -90,11 +91,11 @@ // Verify DidLoseLayerTreeFrameSink callback is hooked up correctly. EXPECT_FALSE(client.did_lose_layer_tree_frame_sink_called()); { - viz::ContextProvider::ScopedContextLock context_lock( + viz::RasterContextProvider::ScopedRasterContextLock context_lock( layer_tree_frame_sink.worker_context_provider()); - context_lock.ContextGL()->LoseContextCHROMIUM( + context_lock.RasterInterface()->LoseContextCHROMIUM( GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB); - context_lock.ContextGL()->Flush(); + context_lock.RasterInterface()->Flush(); } task_runner->RunPendingTasks(); EXPECT_TRUE(client.did_lose_layer_tree_frame_sink_called());
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 272f50e..373b794 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc
@@ -1990,9 +1990,10 @@ layer_tree_frame_sink_->worker_context_provider())) return; - viz::ContextProvider* context_provider = + viz::RasterContextProvider* context_provider = layer_tree_frame_sink_->worker_context_provider(); - viz::ContextProvider::ScopedContextLock scoped_context(context_provider); + viz::RasterContextProvider::ScopedRasterContextLock scoped_context( + context_provider); const auto& caps = context_provider->ContextCapabilities(); *gpu_rasterization_enabled = caps.gpu_rasterization; @@ -2539,7 +2540,7 @@ return; } - viz::ContextProvider* worker_context_provider = + viz::RasterContextProvider* worker_context_provider = layer_tree_frame_sink_->worker_context_provider(); if (use_gpu_rasterization_) { DCHECK(worker_context_provider); @@ -2555,7 +2556,8 @@ // The worker context must support oop raster to enable oop rasterization. bool oop_raster_enabled = settings_.enable_oop_rasterization; if (oop_raster_enabled) { - viz::ContextProvider::ScopedContextLock hold(worker_context_provider); + viz::RasterContextProvider::ScopedRasterContextLock hold( + worker_context_provider); oop_raster_enabled &= worker_context_provider->ContextCapabilities().supports_oop_raster; } @@ -2673,8 +2675,8 @@ compositor_context->ContextGL()->ShallowFlushCHROMIUM(); if (auto* worker_context = layer_tree_frame_sink_->worker_context_provider()) { - viz::ContextProvider::ScopedContextLock hold(worker_context); - worker_context->RasterContext()->ShallowFlushCHROMIUM(); + viz::RasterContextProvider::ScopedRasterContextLock hold(worker_context); + hold.RasterInterface()->ShallowFlushCHROMIUM(); } } } @@ -4641,7 +4643,7 @@ // before we get a chance to go invisible in NotifyAllTileTasksComplete. auto* worker_context = layer_tree_frame_sink_->worker_context_provider(); if (worker_context && is_visible != !!worker_context_visibility_) { - viz::ContextProvider::ScopedContextLock hold(worker_context); + viz::RasterContextProvider::ScopedRasterContextLock hold(worker_context); if (is_visible) { worker_context_visibility_ = worker_context->CacheController()->ClientBecameVisible();
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index 6c16f5e2..7fa7327 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -9461,8 +9461,8 @@ host_impl_->DrawLayers(&frame); host_impl_->DidDrawAllLayers(frame); - // The CopyOutputResult has a ref on the viz::ContextProvider and a texture in - // a texture mailbox. + // The CopyOutputResult has a ref on the viz::ContextProvider and a texture + // in a texture mailbox. ASSERT_TRUE(helper.unprocessed_result); EXPECT_FALSE(context_provider->HasOneRef()); EXPECT_EQ(1u, context_provider->TestContext3d()->NumTextures());
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc index 50fb41d..0404981f 100644 --- a/cc/trees/layer_tree_host_perftest.cc +++ b/cc/trees/layer_tree_host_perftest.cc
@@ -51,7 +51,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { constexpr bool disable_display_vsync = true; bool synchronous_composite = !HasImplThread() &&
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc index b6769a03..6fffa7d8 100644 --- a/cc/trees/layer_tree_host_pixeltest_blending.cc +++ b/cc/trees/layer_tree_host_pixeltest_blending.cc
@@ -73,7 +73,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { viz::RendererSettings modified_renderer_settings = renderer_settings; modified_renderer_settings.force_antialiasing = force_antialiasing_; modified_renderer_settings.force_blending_with_shaders =
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc index c6575b38..df6bd386 100644 --- a/cc/trees/layer_tree_host_pixeltest_masks.cc +++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -504,7 +504,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { viz::RendererSettings modified_renderer_settings = renderer_settings; modified_renderer_settings.force_antialiasing = use_antialiasing_; modified_renderer_settings.force_blending_with_shaders = force_shaders_;
diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc index 27784af..c25cd6d7 100644 --- a/cc/trees/layer_tree_host_pixeltest_readback.cc +++ b/cc/trees/layer_tree_host_pixeltest_readback.cc
@@ -568,7 +568,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { std::unique_ptr<viz::TestLayerTreeFrameSink> frame_sink = LayerTreePixelTest::CreateLayerTreeFrameSink( renderer_settings, refresh_rate, compositor_context_provider,
diff --git a/cc/trees/layer_tree_host_pixeltest_tiles.cc b/cc/trees/layer_tree_host_pixeltest_tiles.cc index b35cac8f..7156d69 100644 --- a/cc/trees/layer_tree_host_pixeltest_tiles.cc +++ b/cc/trees/layer_tree_host_pixeltest_tiles.cc
@@ -177,13 +177,13 @@ void WillPrepareTilesOnThread(LayerTreeHostImpl* host_impl) override { // Issue a GL finish before preparing tiles to ensure resources become // available for use in a timely manner. Needed for the one-copy path. - viz::ContextProvider* context_provider = + viz::RasterContextProvider* context_provider = host_impl->layer_tree_frame_sink()->worker_context_provider(); if (!context_provider) return; - viz::ContextProvider::ScopedContextLock lock(context_provider); - lock.RasterContext()->Finish(); + viz::RasterContextProvider::ScopedRasterContextLock lock(context_provider); + lock.RasterInterface()->Finish(); } protected:
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index 1ef63d99..6018511 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc
@@ -452,7 +452,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { // Create the main viz::ContextProvider with a MockContextSupport. auto main_support = std::make_unique<MockContextSupport>(); mock_main_context_support_ = main_support.get(); @@ -3409,7 +3410,7 @@ public: OnDrawLayerTreeFrameSink( scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, viz::SharedBitmapManager* shared_bitmap_manager, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, const viz::RendererSettings& renderer_settings, @@ -3453,7 +3454,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { auto on_draw_callback = base::Bind( &LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor:: CallOnDraw, @@ -5641,7 +5643,7 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> ignored_compositor_context_provider, - scoped_refptr<viz::ContextProvider> ignored_worker_context_provider) + scoped_refptr<viz::RasterContextProvider> ignored_worker_context_provider) override { auto context_provider = TestContextProvider::Create(); context_provider->UnboundTestContext3d()->SetMaxSamples(4); @@ -6178,7 +6180,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { constexpr bool disable_display_vsync = false; bool synchronous_composite = !HasImplThread() &&
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc index aa950bb..f17b46fe 100644 --- a/cc/trees/layer_tree_host_unittest_context.cc +++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -87,7 +87,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { base::AutoLock lock(context3d_lock_); std::unique_ptr<TestWebGraphicsContext3D> compositor_context3d = @@ -1625,9 +1626,9 @@ if (did_lose_context) return; did_lose_context = true; - viz::ContextProvider::ScopedContextLock scoped_context( + viz::RasterContextProvider::ScopedRasterContextLock scoped_context( host_impl->layer_tree_frame_sink()->worker_context_provider()); - gpu::raster::RasterInterface* ri = scoped_context.RasterContext(); + gpu::raster::RasterInterface* ri = scoped_context.RasterInterface(); ri->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB); }
diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc index 16da098..786c0dd3 100644 --- a/cc/trees/layer_tree_host_unittest_copyrequest.cc +++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc
@@ -481,7 +481,8 @@ const viz::RendererSettings& renderer_settings, double refresh_rate, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider) override { + scoped_refptr<viz::RasterContextProvider> worker_context_provider) + override { auto frame_sink = LayerTreeHostCopyRequestTest::CreateLayerTreeFrameSink( renderer_settings, refresh_rate, std::move(compositor_context_provider), std::move(worker_context_provider));
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 8b7dae57d..4c445a6 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -3142,6 +3142,8 @@ sources += [ "payments/chrome_payment_request_delegate.cc", "payments/chrome_payment_request_delegate.h", + "payments/payment_request_display_manager_factory.cc", + "payments/payment_request_display_manager_factory.h", "payments/payment_request_factory.cc", "payments/payment_request_factory.h", ]
diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc index 660d7f5..e6df712 100644 --- a/chrome/browser/chromeos/system/timezone_util.cc +++ b/chrome/browser/chromeos/system/timezone_util.cc
@@ -347,8 +347,8 @@ } bool FineGrainedTimeZoneDetectionEnabled() { - return base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableFineGrainedTimeZoneDetection); + return !base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableFineGrainedTimeZoneDetection); } } // namespace system
diff --git a/chrome/browser/chromeos/ui/low_disk_notification.cc b/chrome/browser/chromeos/ui/low_disk_notification.cc index aa4ee91..ebfb771 100644 --- a/chrome/browser/chromeos/ui/low_disk_notification.cc +++ b/chrome/browser/chromeos/ui/low_disk_notification.cc
@@ -13,7 +13,6 @@ #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" -#include "chrome/browser/notifications/notification_display_service.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/chrome_pages.h" #include "chrome/grit/generated_resources.h" @@ -23,6 +22,7 @@ #include "content/public/browser/browser_thread.h" #include "ui/base/l10n/l10n_util.h" #include "ui/chromeos/resources/grit/ui_chromeos_resources.h" +#include "ui/message_center/message_center.h" #include "ui/message_center/notification.h" #include "ui/message_center/notification_types.h" #include "ui/message_center/notifier_id.h" @@ -36,12 +36,31 @@ constexpr base::TimeDelta kNotificationInterval = base::TimeDelta::FromMinutes(2); +class LowDiskNotificationDelegate + : public message_center::NotificationDelegate { + public: + LowDiskNotificationDelegate() {} + + // message_center::NotificationDelegate + void ButtonClick(int button_index) override { + chrome::ShowSettingsSubPageForProfile( + ProfileManager::GetActiveUserProfile(), kStoragePage); + } + + private: + ~LowDiskNotificationDelegate() override {} + + DISALLOW_COPY_AND_ASSIGN(LowDiskNotificationDelegate); +}; + } // namespace namespace chromeos { LowDiskNotification::LowDiskNotification() - : notification_interval_(kNotificationInterval), weak_ptr_factory_(this) { + : message_center_(g_browser_process->message_center()), + notification_interval_(kNotificationInterval), + weak_ptr_factory_(this) { DCHECK(DBusThreadManager::Get()->GetCryptohomeClient()); DBusThreadManager::Get()->GetCryptohomeClient()->AddObserver(this); } @@ -68,17 +87,14 @@ if (severity != last_notification_severity_ || (severity == HIGH && now - last_notification_time_ > notification_interval_)) { - Profile* profile = ProfileManager::GetLastUsedProfile(); - NotificationDisplayService::GetForProfile(profile)->Display( - NotificationHandler::Type::TRANSIENT, - *CreateNotification(severity, profile)); + message_center_->AddNotification(CreateNotification(severity)); last_notification_time_ = now; last_notification_severity_ = severity; } } std::unique_ptr<message_center::Notification> -LowDiskNotification::CreateNotification(Severity severity, Profile* profile) { +LowDiskNotification::CreateNotification(Severity severity) { base::string16 title; base::string16 message; message_center::SystemNotificationWarningLevel warning_level; @@ -104,20 +120,12 @@ message_center::NotifierId::SYSTEM_COMPONENT, ash::system_notifier::kNotifierDisk); - auto on_click = base::Bind( - [](Profile* profile, base::Optional<int> button_index) { - if (button_index) { - DCHECK_EQ(0, *button_index); - chrome::ShowSettingsSubPageForProfile(profile, kStoragePage); - } - }, - profile); std::unique_ptr<message_center::Notification> notification = message_center::Notification::CreateSystemNotification( message_center::NOTIFICATION_TYPE_SIMPLE, kLowDiskId, title, message, gfx::Image(), base::string16(), GURL(), notifier_id, optional_fields, - new message_center::HandleNotificationClickDelegate(on_click), - kNotificationStorageFullIcon, warning_level); + new LowDiskNotificationDelegate(), kNotificationStorageFullIcon, + warning_level); return notification; } @@ -131,6 +139,11 @@ return Severity::NONE; } +void LowDiskNotification::SetMessageCenterForTest( + message_center::MessageCenter* message_center) { + message_center_ = message_center; +} + void LowDiskNotification::SetNotificationIntervalForTest( base::TimeDelta notification_interval) { notification_interval_ = notification_interval;
diff --git a/chrome/browser/chromeos/ui/low_disk_notification.h b/chrome/browser/chromeos/ui/low_disk_notification.h index e8bc265..2e4a663 100644 --- a/chrome/browser/chromeos/ui/low_disk_notification.h +++ b/chrome/browser/chromeos/ui/low_disk_notification.h
@@ -15,10 +15,9 @@ #include "base/time/time.h" #include "chromeos/dbus/cryptohome_client.h" -class Profile; - namespace message_center { class Notification; +class MessageCenter; } namespace chromeos { @@ -51,19 +50,22 @@ // Creates a notification for the specified severity. If the severity does // not match a known value MEDIUM is used by default. std::unique_ptr<message_center::Notification> CreateNotification( - Severity severity, - Profile* profile); + Severity severity); // Gets the severity of the low disk status based on the amount of free space // left on the disk. Severity GetSeverity(uint64_t free_disk_bytes); + // Sets the MessageCenter instance to use. Should only be used in tests. + void SetMessageCenterForTest(message_center::MessageCenter* message_center); + // Sets the minimum time to wait between notifications of the same severity. // Should only be used in tests. void SetNotificationIntervalForTest(base::TimeDelta interval); base::Time last_notification_time_; Severity last_notification_severity_ = NONE; + message_center::MessageCenter* message_center_; base::TimeDelta notification_interval_; base::ThreadChecker thread_checker_; base::WeakPtrFactory<LowDiskNotification> weak_ptr_factory_;
diff --git a/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc b/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc index ddb8e23..ab009f4 100644 --- a/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc +++ b/chrome/browser/chromeos/ui/low_disk_notification_unittest.cc
@@ -8,17 +8,17 @@ #include <utility> +#include "base/test/scoped_task_environment.h" +#include "base/threading/platform_thread.h" #include "base/time/time.h" -#include "chrome/browser/notifications/notification_display_service_tester.h" -#include "chrome/browser/profiles/profile_manager.h" #include "chrome/grit/generated_resources.h" -#include "chrome/test/base/browser_with_test_window_test.h" -#include "chrome/test/base/testing_profile_manager.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/fake_cryptohome_client.h" +#include "testing/gtest/include/gtest/gtest.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" -#include "ui/message_center/notification.h" +#include "ui/message_center/fake_message_center.h" +#include "ui/message_center/message_center.h" namespace { @@ -30,44 +30,39 @@ namespace chromeos { -class LowDiskNotificationTest : public BrowserWithTestWindowTest { +class LowDiskNotificationTest : public testing::Test, + public message_center::FakeMessageCenter { public: LowDiskNotificationTest() {} - ~LowDiskNotificationTest() override {} void SetUp() override { DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient( std::unique_ptr<CryptohomeClient>(new FakeCryptohomeClient)); - - BrowserWithTestWindowTest::SetUp(); - - tester_ = std::make_unique<NotificationDisplayServiceTester>( - profile_manager()->profile_manager()->GetLastUsedProfile()); - tester_->SetNotificationAddedClosure(base::Bind( - &LowDiskNotificationTest::OnNotificationAdded, base::Unretained(this))); + message_center::MessageCenter::Initialize(); low_disk_notification_.reset(new LowDiskNotification()); + low_disk_notification_->SetMessageCenterForTest(this); + low_disk_notification_->SetNotificationIntervalForTest( + base::TimeDelta::FromMilliseconds(10)); notification_count_ = 0; } void TearDown() override { low_disk_notification_.reset(); - BrowserWithTestWindowTest::TearDown(); + last_notification_.reset(); + message_center::MessageCenter::Shutdown(); + DBusThreadManager::Shutdown(); } - base::Optional<message_center::Notification> GetNotification() { - return tester_->GetNotification("low_disk"); + void AddNotification( + std::unique_ptr<message_center::Notification> notification) override { + last_notification_ = std::move(notification); + notification_count_++; } - void SetNotificationThrottlingInterval(int ms) { - low_disk_notification_->SetNotificationIntervalForTest( - base::TimeDelta::FromMilliseconds(ms)); - } - - void OnNotificationAdded() { notification_count_++; } - protected: - std::unique_ptr<NotificationDisplayServiceTester> tester_; + base::test::ScopedTaskEnvironment scoped_task_environment_; std::unique_ptr<LowDiskNotification> low_disk_notification_; + std::unique_ptr<message_center::Notification> last_notification_; int notification_count_; }; @@ -75,9 +70,8 @@ base::string16 expected_title = l10n_util::GetStringUTF16(IDS_LOW_DISK_NOTIFICATION_TITLE); low_disk_notification_->LowDiskSpace(kMediumNotification); - auto notification = GetNotification(); - ASSERT_TRUE(notification); - EXPECT_EQ(expected_title, notification->title()); + EXPECT_NE(nullptr, last_notification_); + EXPECT_EQ(expected_title, last_notification_->title()); EXPECT_EQ(1, notification_count_); } @@ -86,29 +80,28 @@ l10n_util::GetStringUTF16(IDS_CRITICALLY_LOW_DISK_NOTIFICATION_TITLE); low_disk_notification_->LowDiskSpace(kMediumNotification); low_disk_notification_->LowDiskSpace(kHighNotification); - auto notification = GetNotification(); - ASSERT_TRUE(notification); - EXPECT_EQ(expected_title, notification->title()); + EXPECT_NE(nullptr, last_notification_); + EXPECT_EQ(expected_title, last_notification_->title()); EXPECT_EQ(2, notification_count_); } TEST_F(LowDiskNotificationTest, NotificationsAreThrottled) { - SetNotificationThrottlingInterval(10000000); low_disk_notification_->LowDiskSpace(kHighNotification); + base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(5)); low_disk_notification_->LowDiskSpace(kHighNotification); EXPECT_EQ(1, notification_count_); } TEST_F(LowDiskNotificationTest, HighNotificationsAreShownAfterThrottling) { - SetNotificationThrottlingInterval(-1); low_disk_notification_->LowDiskSpace(kHighNotification); + base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(15)); low_disk_notification_->LowDiskSpace(kHighNotification); EXPECT_EQ(2, notification_count_); } TEST_F(LowDiskNotificationTest, MediumNotificationsAreNotShownAfterThrottling) { - SetNotificationThrottlingInterval(-1); low_disk_notification_->LowDiskSpace(kMediumNotification); + base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(15)); low_disk_notification_->LowDiskSpace(kMediumNotification); EXPECT_EQ(1, notification_count_); }
diff --git a/chrome/browser/payments/chrome_payment_request_delegate.cc b/chrome/browser/payments/chrome_payment_request_delegate.cc index 83b58a5..b5c8c5a 100644 --- a/chrome/browser/payments/chrome_payment_request_delegate.cc +++ b/chrome/browser/payments/chrome_payment_request_delegate.cc
@@ -11,6 +11,7 @@ #include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/autofill/validation_rules_storage_factory.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/payments/payment_request_display_manager_factory.h" #include "chrome/browser/payments/ssl_validity_checker.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/signin_manager_factory.h" @@ -156,4 +157,10 @@ ServiceAccessType::EXPLICIT_ACCESS); } +PaymentRequestDisplayManager* +ChromePaymentRequestDelegate::GetDisplayManager() { + return PaymentRequestDisplayManagerFactory::GetForBrowserContext( + web_contents_->GetBrowserContext()); +} + } // namespace payments
diff --git a/chrome/browser/payments/chrome_payment_request_delegate.h b/chrome/browser/payments/chrome_payment_request_delegate.h index b5e20608..e6b8f0541 100644 --- a/chrome/browser/payments/chrome_payment_request_delegate.h +++ b/chrome/browser/payments/chrome_payment_request_delegate.h
@@ -45,6 +45,7 @@ bool IsBrowserWindowActive() const override; scoped_refptr<PaymentManifestWebDataService> GetPaymentManifestWebDataService() const override; + PaymentRequestDisplayManager* GetDisplayManager() override; protected: // Reference to the dialog so that we can satisfy calls to CloseDialog(). This
diff --git a/chrome/browser/payments/payment_request_display_manager_factory.cc b/chrome/browser/payments/payment_request_display_manager_factory.cc new file mode 100644 index 0000000..8c8a7c0 --- /dev/null +++ b/chrome/browser/payments/payment_request_display_manager_factory.cc
@@ -0,0 +1,45 @@ +// Copyright 2017 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 "chrome/browser/payments/payment_request_display_manager_factory.h" + +#include "chrome/browser/profiles/incognito_helpers.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "components/payments/content/payment_request_display_manager.h" + +namespace payments { + +PaymentRequestDisplayManagerFactory* +PaymentRequestDisplayManagerFactory::GetInstance() { + return base::Singleton<PaymentRequestDisplayManagerFactory>::get(); +} + +PaymentRequestDisplayManager* +PaymentRequestDisplayManagerFactory::GetForBrowserContext( + content::BrowserContext* context) { + return static_cast<PaymentRequestDisplayManager*>( + GetInstance()->GetServiceForBrowserContext(context, true)); +} + +PaymentRequestDisplayManagerFactory::PaymentRequestDisplayManagerFactory() + : BrowserContextKeyedServiceFactory( + "PaymentRequestDisplayManager", + BrowserContextDependencyManager::GetInstance()) {} + +PaymentRequestDisplayManagerFactory::~PaymentRequestDisplayManagerFactory() {} + +KeyedService* PaymentRequestDisplayManagerFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + return new PaymentRequestDisplayManager(); +} + +content::BrowserContext* +PaymentRequestDisplayManagerFactory::GetBrowserContextToUse( + content::BrowserContext* context) const { + // Returns non-NULL even for Incognito contexts so that a separate + // instance of a service is created for the Incognito context. + return chrome::GetBrowserContextOwnInstanceInIncognito(context); +} + +} // namespace payments
diff --git a/chrome/browser/payments/payment_request_display_manager_factory.h b/chrome/browser/payments/payment_request_display_manager_factory.h new file mode 100644 index 0000000..5f993ccb --- /dev/null +++ b/chrome/browser/payments/payment_request_display_manager_factory.h
@@ -0,0 +1,38 @@ +// Copyright 2017 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 CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_DISPLAY_MANAGER_FACTORY_H_ +#define CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_DISPLAY_MANAGER_FACTORY_H_ + +#include "base/macros.h" +#include "base/memory/singleton.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" + +namespace payments { + +class PaymentRequestDisplayManager; + +class PaymentRequestDisplayManagerFactory + : public BrowserContextKeyedServiceFactory { + public: + static PaymentRequestDisplayManagerFactory* GetInstance(); + static PaymentRequestDisplayManager* GetForBrowserContext( + content::BrowserContext* context); + + private: + PaymentRequestDisplayManagerFactory(); + ~PaymentRequestDisplayManagerFactory() override; + friend struct base::DefaultSingletonTraits< + PaymentRequestDisplayManagerFactory>; + + KeyedService* BuildServiceInstanceFor( + content::BrowserContext* context) const override; + content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* context) const override; + DISALLOW_COPY_AND_ASSIGN(PaymentRequestDisplayManagerFactory); +}; + +} // namespace payments + +#endif // CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_DISPLAY_MANAGER_FACTORY_H_
diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc index cddd04a..73fb7581 100644 --- a/chromeos/chromeos_switches.cc +++ b/chromeos/chromeos_switches.cc
@@ -526,9 +526,9 @@ // Disables per-user timezone. const char kDisablePerUserTimezone[] = "disable-per-user-timezone"; -// Enables fine grained time zone detection. -const char kEnableFineGrainedTimeZoneDetection[] = - "enable-fine-grained-time-zone-detection"; +// Disables fine grained time zone detection. +const char kDisableFineGrainedTimeZoneDetection[] = + "disable-fine-grained-time-zone-detection"; // Disables client certificate authentication on the sign-in frame on the Chrome // OS sign-in profile.
diff --git a/chromeos/chromeos_switches.h b/chromeos/chromeos_switches.h index fee42cc..07884718 100644 --- a/chromeos/chromeos_switches.h +++ b/chromeos/chromeos_switches.h
@@ -99,7 +99,7 @@ CHROMEOS_EXPORT extern const char kEnableTouchpadThreeFingerClick[]; CHROMEOS_EXPORT extern const char kEnableFileManagerTouchMode[]; CHROMEOS_EXPORT extern const char kDisableFileManagerTouchMode[]; -CHROMEOS_EXPORT extern const char kEnableFineGrainedTimeZoneDetection[]; +CHROMEOS_EXPORT extern const char kDisableFineGrainedTimeZoneDetection[]; CHROMEOS_EXPORT extern const char kDisableSigninFrameClientCerts[]; CHROMEOS_EXPORT extern const char kDisableSigninFrameClientCertUserSelection[]; CHROMEOS_EXPORT extern const char kEnableVideoPlayerChromecastSupport[];
diff --git a/components/ntp_snippets/BUILD.gn b/components/ntp_snippets/BUILD.gn index 85afd4a..6cebb58 100644 --- a/components/ntp_snippets/BUILD.gn +++ b/components/ntp_snippets/BUILD.gn
@@ -161,6 +161,7 @@ "//components/variations/net", "//components/variations/service", "//components/web_resource", + "//services/identity/public/cpp", "//third_party/icu/", "//ui/gfx", ]
diff --git a/components/ntp_snippets/DEPS b/components/ntp_snippets/DEPS index 9e6b868..1fbc017d 100644 --- a/components/ntp_snippets/DEPS +++ b/components/ntp_snippets/DEPS
@@ -25,6 +25,7 @@ "+net/traffic_annotation", "+net/url_request", "+google_apis", + "+services/identity/public/cpp", "+ui/base", "+ui/gfx", ]
diff --git a/components/ntp_snippets/breaking_news/subscription_manager_impl.cc b/components/ntp_snippets/breaking_news/subscription_manager_impl.cc index daf5138..2fb5ee2 100644 --- a/components/ntp_snippets/breaking_news/subscription_manager_impl.cc +++ b/components/ntp_snippets/breaking_news/subscription_manager_impl.cc
@@ -15,10 +15,10 @@ #include "components/ntp_snippets/pref_names.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" -#include "components/signin/core/browser/primary_account_access_token_fetcher.h" #include "components/signin/core/browser/signin_manager_base.h" #include "components/variations/service/variations_service.h" #include "net/base/url_util.h" +#include "services/identity/public/cpp/primary_account_access_token_fetcher.h" namespace ntp_snippets {
diff --git a/components/ntp_snippets/contextual/contextual_suggestions_fetcher_impl.cc b/components/ntp_snippets/contextual/contextual_suggestions_fetcher_impl.cc index ff36b1e..b26b0ed 100644 --- a/components/ntp_snippets/contextual/contextual_suggestions_fetcher_impl.cc +++ b/components/ntp_snippets/contextual/contextual_suggestions_fetcher_impl.cc
@@ -11,10 +11,10 @@ #include "base/time/time.h" #include "base/values.h" #include "components/ntp_snippets/category.h" -#include "components/signin/core/browser/primary_account_access_token_fetcher.h" #include "components/strings/grit/components_strings.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_request_status.h" +#include "services/identity/public/cpp/primary_account_access_token_fetcher.h" #include "ui/base/l10n/l10n_util.h" using net::HttpRequestHeaders;
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc index 43eb8a3..c9ab836 100644 --- a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc +++ b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc
@@ -16,10 +16,10 @@ #include "components/ntp_snippets/category.h" #include "components/ntp_snippets/ntp_snippets_constants.h" #include "components/ntp_snippets/user_classifier.h" -#include "components/signin/core/browser/primary_account_access_token_fetcher.h" #include "components/signin/core/browser/signin_manager_base.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_request_status.h" +#include "services/identity/public/cpp/primary_account_access_token_fetcher.h" using language::UrlLanguageHistogram; using net::HttpRequestHeaders;
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn index 2ee3506..f6a1e158 100644 --- a/components/omnibox/browser/BUILD.gn +++ b/components/omnibox/browser/BUILD.gn
@@ -58,8 +58,6 @@ "base_search_provider.h", "bookmark_provider.cc", "bookmark_provider.h", - "tailored_word_break_iterator.cc", - "tailored_word_break_iterator.h", "builtin_provider.cc", "builtin_provider.h", "clipboard_url_provider.cc", @@ -131,6 +129,8 @@ "shortcuts_provider.h", "suggestion_answer.cc", "suggestion_answer.h", + "tailored_word_break_iterator.cc", + "tailored_word_break_iterator.h", "titled_url_match_utils.cc", "titled_url_match_utils.h", "url_index_private_data.cc", @@ -177,6 +177,7 @@ "//components/variations/net", "//extensions/common:common_constants", "//net", + "//services/identity/public/cpp", "//skia", "//sql", "//third_party/protobuf:protobuf_lite",
diff --git a/components/omnibox/browser/DEPS b/components/omnibox/browser/DEPS index 525d0717..7242762 100644 --- a/components/omnibox/browser/DEPS +++ b/components/omnibox/browser/DEPS
@@ -24,6 +24,7 @@ "+components/vector_icons", "+extensions/common/constants.h", "+net", + "+services/identity/public/cpp", "+sql", "+third_party/metrics_proto", "+third_party/protobuf/src/google",
diff --git a/components/omnibox/browser/clipboard_url_provider.cc b/components/omnibox/browser/clipboard_url_provider.cc index 7ffb4b975..8bddb9f 100644 --- a/components/omnibox/browser/clipboard_url_provider.cc +++ b/components/omnibox/browser/clipboard_url_provider.cc
@@ -87,7 +87,9 @@ // Add the clipboard match. The relevance is 800 to beat ZeroSuggest results. AutocompleteMatch match(this, 800, false, AutocompleteMatchType::CLIPBOARD); match.destination_url = url; - auto format_types = AutocompleteMatch::GetFormatTypes(false, false, false); + // Because the user did not type a related input to get this clipboard + // suggestion, preserve the path and subdomain so the user has extra context. + auto format_types = AutocompleteMatch::GetFormatTypes(false, true, true); match.contents.assign(url_formatter::FormatUrl( url, format_types, net::UnescapeRule::SPACES, nullptr, nullptr, nullptr)); AutocompleteMatch::ClassifyLocationInString(
diff --git a/components/omnibox/browser/contextual_suggestions_service.h b/components/omnibox/browser/contextual_suggestions_service.h index 7a49184e..9bdea30 100644 --- a/components/omnibox/browser/contextual_suggestions_service.h +++ b/components/omnibox/browser/contextual_suggestions_service.h
@@ -9,8 +9,8 @@ #include <string> #include "components/keyed_service/core/keyed_service.h" -#include "components/signin/core/browser/primary_account_access_token_fetcher.h" #include "net/url_request/url_fetcher_delegate.h" +#include "services/identity/public/cpp/primary_account_access_token_fetcher.h" #include "url/gurl.h" class OAuth2TokenService;
diff --git a/components/omnibox/browser/physical_web_provider.cc b/components/omnibox/browser/physical_web_provider.cc index d3d18ef..f0fc9c3 100644 --- a/components/omnibox/browser/physical_web_provider.cc +++ b/components/omnibox/browser/physical_web_provider.cc
@@ -236,8 +236,11 @@ AutocompleteMatchType::PHYSICAL_WEB); match.destination_url = url; + // Because the user did not type a related input to get this clipboard + // suggestion, preserve the path and subdomain so the user has extra + // context. match.contents = url_formatter::FormatUrl( - url, AutocompleteMatch::GetFormatTypes(false, false, false), + url, AutocompleteMatch::GetFormatTypes(false, true, true), net::UnescapeRule::SPACES, nullptr, nullptr, nullptr); match.contents_class.push_back( ACMatchClassification(0, ACMatchClassification::URL));
diff --git a/components/payments/content/BUILD.gn b/components/payments/content/BUILD.gn index 2c3c739..c0ebafe 100644 --- a/components/payments/content/BUILD.gn +++ b/components/payments/content/BUILD.gn
@@ -12,6 +12,8 @@ "payment_request_converter.cc", "payment_request_converter.h", "payment_request_dialog.h", + "payment_request_display_manager.cc", + "payment_request_display_manager.h", "payment_request_spec.cc", "payment_request_spec.h", "payment_request_state.cc",
diff --git a/components/payments/content/DEPS b/components/payments/content/DEPS index b3e1cdd9..0d2f1029c 100644 --- a/components/payments/content/DEPS +++ b/components/payments/content/DEPS
@@ -2,6 +2,7 @@ "-components/payments/content/android", "+components/autofill", "+components/keyed_service/content", + "+components/keyed_service/core", "+components/prefs", "+components/strings", "+components/url_formatter",
diff --git a/components/payments/content/content_payment_request_delegate.h b/components/payments/content/content_payment_request_delegate.h index 569fb018..07c0d03 100644 --- a/components/payments/content/content_payment_request_delegate.h +++ b/components/payments/content/content_payment_request_delegate.h
@@ -13,6 +13,7 @@ namespace payments { class PaymentManifestWebDataService; +class PaymentRequestDisplayManager; // The delegate for PaymentRequest that can use content. class ContentPaymentRequestDelegate : public PaymentRequestDelegate { @@ -22,6 +23,10 @@ // Returns the web data service for caching payment method manifests. virtual scoped_refptr<PaymentManifestWebDataService> GetPaymentManifestWebDataService() const = 0; + + // Returns the PaymentRequestDisplayManager associated with this + // PaymentRequest's BrowserContext. + virtual PaymentRequestDisplayManager* GetDisplayManager() = 0; }; } // namespace payments
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc index 7489cf3..8da5c9c 100644 --- a/components/payments/content/payment_request.cc +++ b/components/payments/content/payment_request.cc
@@ -33,11 +33,14 @@ content::WebContents* web_contents, std::unique_ptr<ContentPaymentRequestDelegate> delegate, PaymentRequestWebContentsManager* manager, + PaymentRequestDisplayManager* display_manager, mojo::InterfaceRequest<mojom::PaymentRequest> request, ObserverForTest* observer_for_testing) : web_contents_(web_contents), delegate_(std::move(delegate)), manager_(manager), + display_manager_(display_manager), + display_handle_(nullptr), binding_(this, std::move(request)), top_level_origin_(url_formatter::FormatUrlForSecurityDisplay( web_contents_->GetLastCommittedURL())), @@ -155,7 +158,8 @@ } // A tab can display only one PaymentRequest UI at a time. - if (!manager_->CanShow(this)) { + display_handle_ = display_manager_->TryShow(); + if (!display_handle_) { LOG(ERROR) << "A PaymentRequest UI is already showing"; journey_logger_.SetNotShown( JourneyLogger::NOT_SHOWN_REASON_CONCURRENT_REQUESTS); @@ -184,7 +188,8 @@ if (methods_supported) { journey_logger_.SetEventOccurred(JourneyLogger::EVENT_SHOWN); - delegate_->ShowDialog(this); + DCHECK(display_handle_); + display_handle_->Show(delegate_.get(), this); } else { journey_logger_.SetNotShown( JourneyLogger::NOT_SHOWN_REASON_NO_SUPPORTED_PAYMENT_METHOD); @@ -339,6 +344,10 @@ state_->GeneratePaymentResponse(); } +void PaymentRequest::HideIfNecessary() { + display_handle_.reset(); +} + void PaymentRequest::RecordFirstAbortReason( JourneyLogger::AbortReason abort_reason) { if (!has_recorded_completion_) {
diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h index 7a24a6b5..2fea0388 100644 --- a/components/payments/content/payment_request.h +++ b/components/payments/content/payment_request.h
@@ -10,6 +10,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" +#include "components/payments/content/payment_request_display_manager.h" #include "components/payments/content/payment_request_spec.h" #include "components/payments/content/payment_request_state.h" #include "components/payments/core/journey_logger.h" @@ -54,6 +55,7 @@ content::WebContents* web_contents, std::unique_ptr<ContentPaymentRequestDelegate> delegate, PaymentRequestWebContentsManager* manager, + PaymentRequestDisplayManager* display_manager, mojo::InterfaceRequest<mojom::PaymentRequest> request, ObserverForTest* observer_for_testing); ~PaymentRequest() override; @@ -96,6 +98,9 @@ // Called when the user clicks on the "Pay" button. void Pay(); + // Hide this Payment Request if it's already showing. + void HideIfNecessary(); + content::WebContents* web_contents() { return web_contents_; } PaymentRequestSpec* spec() { return spec_.get(); } @@ -126,6 +131,8 @@ std::unique_ptr<ContentPaymentRequestDelegate> delegate_; // |manager_| owns this PaymentRequest. PaymentRequestWebContentsManager* manager_; + PaymentRequestDisplayManager* display_manager_; + std::unique_ptr<PaymentRequestDisplayManager::DisplayHandle> display_handle_; mojo::Binding<mojom::PaymentRequest> binding_; mojom::PaymentRequestClientPtr client_;
diff --git a/components/payments/content/payment_request_display_manager.cc b/components/payments/content/payment_request_display_manager.cc new file mode 100644 index 0000000..6af4559 --- /dev/null +++ b/components/payments/content/payment_request_display_manager.cc
@@ -0,0 +1,54 @@ +// Copyright 2017 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 "components/payments/content/payment_request_display_manager.h" + +#include "base/logging.h" +#include "base/memory/ptr_util.h" +#include "components/payments/content/content_payment_request_delegate.h" + +namespace payments { + +class PaymentRequest; + +PaymentRequestDisplayManager::DisplayHandle::DisplayHandle( + PaymentRequestDisplayManager* display_manager) + : display_manager_(display_manager) { + display_manager_->SetHandleAlive(true); +} + +PaymentRequestDisplayManager::DisplayHandle::~DisplayHandle() { + display_manager_->SetHandleAlive(false); +} + +void PaymentRequestDisplayManager::DisplayHandle::Show( + ContentPaymentRequestDelegate* delegate, + PaymentRequest* request) { + DCHECK(request); + DCHECK(delegate); + + delegate->ShowDialog(request); +} + +PaymentRequestDisplayManager::PaymentRequestDisplayManager() + : handle_alive_(false) {} + +PaymentRequestDisplayManager::~PaymentRequestDisplayManager() {} + +std::unique_ptr<PaymentRequestDisplayManager::DisplayHandle> +PaymentRequestDisplayManager::TryShow() { + std::unique_ptr<PaymentRequestDisplayManager::DisplayHandle> handle = nullptr; + if (!handle_alive_) { + handle = + base::MakeUnique<PaymentRequestDisplayManager::DisplayHandle>(this); + } + + return handle; +} + +void PaymentRequestDisplayManager::SetHandleAlive(bool handle_alive) { + handle_alive_ = handle_alive; +} + +} // namespace payments
diff --git a/components/payments/content/payment_request_display_manager.h b/components/payments/content/payment_request_display_manager.h new file mode 100644 index 0000000..9609801 --- /dev/null +++ b/components/payments/content/payment_request_display_manager.h
@@ -0,0 +1,51 @@ +// Copyright 2017 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 COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DISPLAY_MANAGER_H_ +#define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DISPLAY_MANAGER_H_ + +#include <memory> + +#include "base/macros.h" +#include "components/keyed_service/core/keyed_service.h" + +namespace payments { + +class ContentPaymentRequestDelegate; +class PaymentRequest; + +// This KeyedService is responsible for displaying and hiding Payment Request +// UI. It ensures that only one Payment Request is showing per profile. +class PaymentRequestDisplayManager : public KeyedService { + public: + class DisplayHandle { + public: + explicit DisplayHandle(PaymentRequestDisplayManager* display_manager); + ~DisplayHandle(); + void Show(ContentPaymentRequestDelegate* delegate, PaymentRequest* request); + + private: + PaymentRequestDisplayManager* display_manager_; + DISALLOW_COPY_AND_ASSIGN(DisplayHandle); + }; + + PaymentRequestDisplayManager(); + ~PaymentRequestDisplayManager() override; + + // If no PaymentRequest is currently showing, returns a unique_ptr to a + // display handle that can be used to display the PaymentRequest dialog. The + // UI is considered open until the handle object is deleted. + std::unique_ptr<DisplayHandle> TryShow(); + + private: + void SetHandleAlive(bool handle_alive); + + bool handle_alive_; + + DISALLOW_COPY_AND_ASSIGN(PaymentRequestDisplayManager); +}; + +} // namespace payments + +#endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DISPLAY_MANAGER_H_
diff --git a/components/payments/content/payment_request_web_contents_manager.cc b/components/payments/content/payment_request_web_contents_manager.cc index fee6681..57ac2b4 100644 --- a/components/payments/content/payment_request_web_contents_manager.cc +++ b/components/payments/content/payment_request_web_contents_manager.cc
@@ -9,6 +9,7 @@ #include "base/logging.h" #include "components/payments/content/content_payment_request_delegate.h" #include "components/payments/content/payment_request.h" +#include "components/payments/content/payment_request_display_manager.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/web_contents.h" @@ -35,7 +36,7 @@ PaymentRequest::ObserverForTest* observer_for_testing) { auto new_request = std::make_unique<PaymentRequest>( render_frame_host, web_contents, std::move(delegate), this, - std::move(request), observer_for_testing); + delegate->GetDisplayManager(), std::move(request), observer_for_testing); PaymentRequest* request_ptr = new_request.get(); payment_requests_.insert(std::make_pair(request_ptr, std::move(new_request))); } @@ -58,24 +59,12 @@ } void PaymentRequestWebContentsManager::DestroyRequest(PaymentRequest* request) { - if (request == showing_) - showing_ = nullptr; + request->HideIfNecessary(); payment_requests_.erase(request); } -bool PaymentRequestWebContentsManager::CanShow(PaymentRequest* request) { - DCHECK(request); - DCHECK(payment_requests_.find(request) != payment_requests_.end()); - if (!showing_) { - showing_ = request; - return true; - } else { - return false; - } -} - PaymentRequestWebContentsManager::PaymentRequestWebContentsManager( content::WebContents* web_contents) - : content::WebContentsObserver(web_contents), showing_(nullptr) {} + : content::WebContentsObserver(web_contents) {} } // namespace payments
diff --git a/components/payments/content/payment_request_web_contents_manager.h b/components/payments/content/payment_request_web_contents_manager.h index f54396a..e832316c 100644 --- a/components/payments/content/payment_request_web_contents_manager.h +++ b/components/payments/content/payment_request_web_contents_manager.h
@@ -56,12 +56,6 @@ // Destroys the given |request|. void DestroyRequest(PaymentRequest* request); - // Called when |request| has received the show() call. If the |request| can be - // shown, then returns true and assumes that |request| is now showing until - // DestroyRequest(|request|) is called with the same pointer. (Only one - // request at a time can be shown per tab.) - bool CanShow(PaymentRequest* request); - // WebContentsObserver:: void DidStartNavigation( content::NavigationHandle* navigation_handle) override; @@ -77,10 +71,6 @@ // the requests themselves call DestroyRequest(). std::map<PaymentRequest*, std::unique_ptr<PaymentRequest>> payment_requests_; - // The currently displayed instance of PaymentRequest. Points to one of the - // elements in |payment_requests_|. Can be null. - PaymentRequest* showing_; - DISALLOW_COPY_AND_ASSIGN(PaymentRequestWebContentsManager); };
diff --git a/components/payments/content/test_content_payment_request_delegate.cc b/components/payments/content/test_content_payment_request_delegate.cc index 5e126a9..fcd4659 100644 --- a/components/payments/content/test_content_payment_request_delegate.cc +++ b/components/payments/content/test_content_payment_request_delegate.cc
@@ -15,7 +15,12 @@ TestContentPaymentRequestDelegate::~TestContentPaymentRequestDelegate() {} scoped_refptr<PaymentManifestWebDataService> -TestContentPaymentRequestDelegate ::GetPaymentManifestWebDataService() const { +TestContentPaymentRequestDelegate::GetPaymentManifestWebDataService() const { + return nullptr; +} + +PaymentRequestDisplayManager* +TestContentPaymentRequestDelegate::GetDisplayManager() { return nullptr; }
diff --git a/components/payments/content/test_content_payment_request_delegate.h b/components/payments/content/test_content_payment_request_delegate.h index 449199e2..aa7ba30 100644 --- a/components/payments/content/test_content_payment_request_delegate.h +++ b/components/payments/content/test_content_payment_request_delegate.h
@@ -23,6 +23,7 @@ // ContentPaymentRequestDelegate: scoped_refptr<PaymentManifestWebDataService> GetPaymentManifestWebDataService() const override; + PaymentRequestDisplayManager* GetDisplayManager() override; void ShowDialog(PaymentRequest* request) override; void CloseDialog() override; void ShowErrorMessage() override;
diff --git a/components/signin/core/browser/BUILD.gn b/components/signin/core/browser/BUILD.gn index a1ce834..2dd4a93 100644 --- a/components/signin/core/browser/BUILD.gn +++ b/components/signin/core/browser/BUILD.gn
@@ -60,8 +60,6 @@ "gaia_cookie_manager_service.h", "mirror_account_reconcilor_delegate.cc", "mirror_account_reconcilor_delegate.h", - "primary_account_access_token_fetcher.cc", - "primary_account_access_token_fetcher.h", "profile_identity_provider.cc", "profile_identity_provider.h", "profile_management_switches.cc", @@ -204,7 +202,6 @@ "account_tracker_service_unittest.cc", "dice_account_reconcilor_delegate_unittest.cc", "gaia_cookie_manager_service_unittest.cc", - "primary_account_access_token_fetcher_unittest.cc", "profile_management_switches_unittest.cc", "refresh_token_annotation_request_unittest.cc", "signin_error_controller_unittest.cc",
diff --git a/components/suggestions/BUILD.gn b/components/suggestions/BUILD.gn index fa4acf4a..0c66482 100644 --- a/components/suggestions/BUILD.gn +++ b/components/suggestions/BUILD.gn
@@ -43,6 +43,7 @@ "//components/variations", "//components/variations/net", "//google_apis", + "//services/identity/public/cpp", ] if (is_ios) {
diff --git a/components/suggestions/DEPS b/components/suggestions/DEPS index aa0c78e..c0d5d78 100644 --- a/components/suggestions/DEPS +++ b/components/suggestions/DEPS
@@ -12,6 +12,7 @@ "+components/variations", "+google_apis", "+net", + "+services/identity/public/cpp", "+skia/ext", "+ui", "+url",
diff --git a/components/suggestions/suggestions_service_impl.h b/components/suggestions/suggestions_service_impl.h index f6d0c36b..a19104e 100644 --- a/components/suggestions/suggestions_service_impl.h +++ b/components/suggestions/suggestions_service_impl.h
@@ -21,13 +21,13 @@ #include "base/time/tick_clock.h" #include "base/time/time.h" #include "base/timer/timer.h" -#include "components/signin/core/browser/primary_account_access_token_fetcher.h" #include "components/suggestions/proto/suggestions.pb.h" #include "components/suggestions/suggestions_service.h" #include "components/sync/driver/sync_service_observer.h" #include "google_apis/gaia/google_service_auth_error.h" #include "net/base/backoff_entry.h" #include "net/url_request/url_fetcher_delegate.h" +#include "services/identity/public/cpp/primary_account_access_token_fetcher.h" #include "url/gurl.h" class OAuth2TokenService;
diff --git a/components/viz/client/client_layer_tree_frame_sink.cc b/components/viz/client/client_layer_tree_frame_sink.cc index b4451c07..e89e538 100644 --- a/components/viz/client/client_layer_tree_frame_sink.cc +++ b/components/viz/client/client_layer_tree_frame_sink.cc
@@ -37,7 +37,7 @@ ClientLayerTreeFrameSink::ClientLayerTreeFrameSink( scoped_refptr<ContextProvider> context_provider, - scoped_refptr<ContextProvider> worker_context_provider, + scoped_refptr<RasterContextProvider> worker_context_provider, InitParams* params) : cc::LayerTreeFrameSink(std::move(context_provider), std::move(worker_context_provider),
diff --git a/components/viz/client/client_layer_tree_frame_sink.h b/components/viz/client/client_layer_tree_frame_sink.h index eda54a4..3bf4dd4 100644 --- a/components/viz/client/client_layer_tree_frame_sink.h +++ b/components/viz/client/client_layer_tree_frame_sink.h
@@ -62,7 +62,7 @@ ClientLayerTreeFrameSink( scoped_refptr<ContextProvider> context_provider, - scoped_refptr<ContextProvider> worker_context_provider, + scoped_refptr<RasterContextProvider> worker_context_provider, InitParams* params); ClientLayerTreeFrameSink(
diff --git a/components/viz/common/BUILD.gn b/components/viz/common/BUILD.gn index e92cc15a..aac91bf0b 100644 --- a/components/viz/common/BUILD.gn +++ b/components/viz/common/BUILD.gn
@@ -62,6 +62,8 @@ "gpu/context_provider.h", "gpu/in_process_context_provider.cc", "gpu/in_process_context_provider.h", + "gpu/raster_context_provider.cc", + "gpu/raster_context_provider.h", "gpu/vulkan_context_provider.h", "gpu/vulkan_in_process_context_provider.cc", "gpu/vulkan_in_process_context_provider.h",
diff --git a/components/viz/common/gpu/context_provider.h b/components/viz/common/gpu/context_provider.h index f2be096..21af48a04 100644 --- a/components/viz/common/gpu/context_provider.h +++ b/components/viz/common/gpu/context_provider.h
@@ -30,21 +30,13 @@ namespace gles2 { class GLES2Interface; } -namespace raster { -class RasterInterface; -} + } // namespace gpu namespace viz { -class VIZ_COMMON_EXPORT ContextProvider - : public base::RefCountedThreadSafe<ContextProvider> { +class VIZ_COMMON_EXPORT ContextProvider { public: - // Hold an instance of this lock while using a context across multiple - // threads. This only works for ContextProviders that will return a valid - // lock from GetLock(), so is not always supported. Most use of - // ContextProvider should be single-thread only on the thread that - // BindToCurrentThread is run on. class VIZ_COMMON_EXPORT ScopedContextLock { public: explicit ScopedContextLock(ContextProvider* context_provider); @@ -54,16 +46,16 @@ return context_provider_->ContextGL(); } - gpu::raster::RasterInterface* RasterContext() { - return context_provider_->RasterContext(); - } - private: ContextProvider* const context_provider_; base::AutoLock context_lock_; std::unique_ptr<ContextCacheController::ScopedBusy> busy_; }; + // RefCounted interface. + virtual void AddRef() const = 0; + virtual void Release() const = 0; + // Bind the 3d context to the current thread. This should be called before // accessing the contexts. Calling it more than once should have no effect. // Once this function has been called, the class should only be accessed @@ -72,39 +64,6 @@ // can be used to provide access from multiple threads. virtual gpu::ContextResult BindToCurrentThread() = 0; - // Get a GLES2 interface to the 3d context. Returns nullptr if the context - // provider was not bound to a thread, or if the GLES2 interface is not - // supported by this context. - virtual gpu::gles2::GLES2Interface* ContextGL() = 0; - - // Get a Raster interface to the 3d context. Returns nullptr if the context - // provider was not bound to a thread, or if the Raster interface is not - // supported by this context. - virtual gpu::raster::RasterInterface* RasterContext() = 0; - - // Get a ContextSupport interface to the 3d context. Returns nullptr if the - // context provider was not bound to a thread. - virtual gpu::ContextSupport* ContextSupport() = 0; - - // Get a Raster interface to the 3d context. Returns nullptr if the context - // provider was not bound to a thread, or if a GrContext fails to initialize - // on this context. - virtual class GrContext* GrContext() = 0; - - // Get a CacheController interface to the 3d context. Returns nullptr if the - // context provider was not bound to a thread. - virtual ContextCacheController* CacheController() = 0; - - // Invalidates the cached OpenGL state in GrContext. - // See skia GrContext::resetContext for details. - virtual void InvalidateGrContext(uint32_t state) = 0; - - // Returns the capabilities of the currently bound 3d context. - virtual const gpu::Capabilities& ContextCapabilities() const = 0; - - // Returns feature blacklist decisions and driver bug workarounds info. - virtual const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const = 0; - // Adds/removes an observer to be called when the context is lost. AddObserver // should be called before BindToCurrentThread from the same thread that the // context is bound to, or any time while the lock is acquired after checking @@ -120,9 +79,39 @@ // directly. virtual base::Lock* GetLock() = 0; + // Get a CacheController interface to the 3d context. The context provider + // must have been successfully bound to a thread before calling this. + virtual ContextCacheController* CacheController() = 0; + + // Get a ContextSupport interface to the 3d context. The context provider + // must have been successfully bound to a thread before calling this. + virtual gpu::ContextSupport* ContextSupport() = 0; + + // Get a Skia GPU raster interface to the 3d context. The context provider + // must have been successfully bound to a thread before calling this. Returns + // nullptr if a GrContext fails to initialize on this context. + virtual class GrContext* GrContext() = 0; + + // Invalidates the cached OpenGL state in GrContext. The context provider + // must have been successfully bound to a thread before calling this. + // See skia GrContext::resetContext for details. + virtual void InvalidateGrContext(uint32_t state) = 0; + + // Returns the capabilities of the currently bound 3d context. The context + // provider must have been successfully bound to a thread before calling this. + virtual const gpu::Capabilities& ContextCapabilities() const = 0; + + // Returns feature blacklist decisions and driver bug workarounds info. The + // context provider must have been successfully bound to a thread before + // calling this. + virtual const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const = 0; + + // Get a GLES2 interface to the 3d context. The context provider must have + // been successfully bound to a thread before calling this. + virtual gpu::gles2::GLES2Interface* ContextGL() = 0; + protected: - friend class base::RefCountedThreadSafe<ContextProvider>; - virtual ~ContextProvider() {} + virtual ~ContextProvider() = default; }; } // namespace viz
diff --git a/components/viz/common/gpu/in_process_context_provider.cc b/components/viz/common/gpu/in_process_context_provider.cc index f584395..a4fa4eb9 100644 --- a/components/viz/common/gpu/in_process_context_provider.cc +++ b/components/viz/common/gpu/in_process_context_provider.cc
@@ -78,6 +78,14 @@ InProcessContextProvider::~InProcessContextProvider() = default; +void InProcessContextProvider::AddRef() const { + base::RefCountedThreadSafe<InProcessContextProvider>::AddRef(); +} + +void InProcessContextProvider::Release() const { + base::RefCountedThreadSafe<InProcessContextProvider>::Release(); +} + gpu::ContextResult InProcessContextProvider::BindToCurrentThread() { return context_result_; } @@ -86,12 +94,6 @@ return context_->GetImplementation(); } -gpu::raster::RasterInterface* InProcessContextProvider::RasterContext() { - // RasterContext use isn't expected in viz compositor context. - DLOG(ERROR) << "Unexpected access to RasterContext()"; - return nullptr; -} - gpu::ContextSupport* InProcessContextProvider::ContextSupport() { return context_->GetImplementation(); }
diff --git a/components/viz/common/gpu/in_process_context_provider.h b/components/viz/common/gpu/in_process_context_provider.h index 18911df..3218727e7 100644 --- a/components/viz/common/gpu/in_process_context_provider.h +++ b/components/viz/common/gpu/in_process_context_provider.h
@@ -38,7 +38,9 @@ // the compositor and gpu thread. // TODO(kylechar): Rename VizProcessContextProvider and move to // components/viz/service. -class VIZ_COMMON_EXPORT InProcessContextProvider : public ContextProvider { +class VIZ_COMMON_EXPORT InProcessContextProvider + : public base::RefCountedThreadSafe<InProcessContextProvider>, + public ContextProvider { public: InProcessContextProvider( scoped_refptr<gpu::InProcessCommandBuffer::Service> service, @@ -49,9 +51,11 @@ const gpu::SharedMemoryLimits& limits, InProcessContextProvider* shared_context); + // ContextProvider implementation. + void AddRef() const override; + void Release() const override; gpu::ContextResult BindToCurrentThread() override; gpu::gles2::GLES2Interface* ContextGL() override; - gpu::raster::RasterInterface* RasterContext() override; gpu::ContextSupport* ContextSupport() override; class GrContext* GrContext() override; ContextCacheController* CacheController() override;
diff --git a/components/viz/common/gpu/raster_context_provider.cc b/components/viz/common/gpu/raster_context_provider.cc new file mode 100644 index 0000000..7dca96c --- /dev/null +++ b/components/viz/common/gpu/raster_context_provider.cc
@@ -0,0 +1,21 @@ +// Copyright 2017 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 "components/viz/common/gpu/raster_context_provider.h" + +namespace viz { + +RasterContextProvider::ScopedRasterContextLock::ScopedRasterContextLock( + RasterContextProvider* context_provider) + : context_provider_(context_provider), + context_lock_(*context_provider_->GetLock()) { + busy_ = context_provider_->CacheController()->ClientBecameBusy(); +} + +RasterContextProvider::ScopedRasterContextLock::~ScopedRasterContextLock() { + // Let ContextCacheController know we are no longer busy. + context_provider_->CacheController()->ClientBecameNotBusy(std::move(busy_)); +} + +} // namespace viz
diff --git a/components/viz/common/gpu/raster_context_provider.h b/components/viz/common/gpu/raster_context_provider.h new file mode 100644 index 0000000..e46927c --- /dev/null +++ b/components/viz/common/gpu/raster_context_provider.h
@@ -0,0 +1,118 @@ +// Copyright 2017 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 COMPONENTS_VIZ_COMMON_GPU_RASTER_CONTEXT_PROVIDER_H_ +#define COMPONENTS_VIZ_COMMON_GPU_RASTER_CONTEXT_PROVIDER_H_ + +#include <stddef.h> +#include <stdint.h> + +#include "base/callback.h" +#include "base/memory/ref_counted.h" +#include "base/synchronization/lock.h" +#include "components/viz/common/gpu/context_cache_controller.h" +#include "components/viz/common/gpu/context_lost_observer.h" +#include "components/viz/common/viz_common_export.h" +#include "gpu/command_buffer/common/capabilities.h" +#include "gpu/command_buffer/common/context_result.h" + +class GrContext; + +namespace base { +class Lock; +} + +namespace gpu { +class ContextSupport; +struct GpuFeatureInfo; + +namespace raster { +class RasterInterface; +} +} // namespace gpu + +namespace viz { + +class VIZ_COMMON_EXPORT RasterContextProvider { + public: + class VIZ_COMMON_EXPORT ScopedRasterContextLock { + public: + explicit ScopedRasterContextLock(RasterContextProvider* context_provider); + ~ScopedRasterContextLock(); + + gpu::raster::RasterInterface* RasterInterface() { + return context_provider_->RasterInterface(); + } + + private: + RasterContextProvider* const context_provider_; + base::AutoLock context_lock_; + std::unique_ptr<ContextCacheController::ScopedBusy> busy_; + }; + + // RefCounted interface. + virtual void AddRef() const = 0; + virtual void Release() const = 0; + + // Bind the 3d context to the current thread. This should be called before + // accessing the contexts. Calling it more than once should have no effect. + // Once this function has been called, the class should only be accessed + // from the same thread unless the function has some explicitly specified + // rules for access on a different thread. See SetupLockOnMainThread(), which + // can be used to provide access from multiple threads. + virtual gpu::ContextResult BindToCurrentThread() = 0; + + // Adds/removes an observer to be called when the context is lost. AddObserver + // should be called before BindToCurrentThread from the same thread that the + // context is bound to, or any time while the lock is acquired after checking + // for context loss. + // NOTE: Implementations must avoid post-tasking the to the observer directly + // as the observer may remove itself before the task runs. + virtual void AddObserver(ContextLostObserver* obs) = 0; + virtual void RemoveObserver(ContextLostObserver* obs) = 0; + + // Returns the lock that should be held if using this context from multiple + // threads. This can be called on any thread. + // NOTE: Helper method for ScopedContextLock. Use that instead of calling this + // directly. + virtual base::Lock* GetLock() = 0; + + // Get a CacheController interface to the 3d context. The context provider + // must have been successfully bound to a thread before calling this. + virtual ContextCacheController* CacheController() = 0; + + // Get a ContextSupport interface to the 3d context. The context provider + // must have been successfully bound to a thread before calling this. + virtual gpu::ContextSupport* ContextSupport() = 0; + + // Get a Skia GPU raster interface to the 3d context. The context provider + // must have been successfully bound to a thread before calling this. Returns + // nullptr if a GrContext fails to initialize on this context. + virtual class GrContext* GrContext() = 0; + + // Invalidates the cached OpenGL state in GrContext. The context provider + // must have been successfully bound to a thread before calling this. + // See skia GrContext::resetContext for details. + virtual void InvalidateGrContext(uint32_t state) = 0; + + // Returns the capabilities of the currently bound 3d context. The context + // provider must have been successfully bound to a thread before calling this. + virtual const gpu::Capabilities& ContextCapabilities() const = 0; + + // Returns feature blacklist decisions and driver bug workarounds info. The + // context provider must have been successfully bound to a thread before + // calling this. + virtual const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const = 0; + + // Get a Raster interface to the 3d context. The context provider must have + // been successfully bound to a thread before calling this. + virtual gpu::raster::RasterInterface* RasterInterface() = 0; + + protected: + virtual ~RasterContextProvider() = default; +}; + +} // namespace viz + +#endif // COMPONENTS_VIZ_COMMON_GPU_RASTER_CONTEXT_PROVIDER_H_
diff --git a/components/viz/service/display/display.cc b/components/viz/service/display/display.cc index 77bd2fb..d5c8f311 100644 --- a/components/viz/service/display/display.cc +++ b/components/viz/service/display/display.cc
@@ -99,8 +99,8 @@ InitializeRenderer(); // This depends on assumptions that Display::Initialize will happen on the - // same callstack as the ContextProvider being created/initialized or else it - // could miss a callback before setting this. + // same callstack as the ContextProvider being created/initialized or else + // it could miss a callback before setting this. if (auto* context = output_surface_->context_provider()) context->AddObserver(this); }
diff --git a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc index f7b9821..c0c250d 100644 --- a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc +++ b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.cc
@@ -23,7 +23,7 @@ Display* display, mojom::DisplayClient* display_client, scoped_refptr<ContextProvider> context_provider, - scoped_refptr<ContextProvider> worker_context_provider, + scoped_refptr<RasterContextProvider> worker_context_provider, scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, SharedBitmapManager* shared_bitmap_manager)
diff --git a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h index 4044f9a1..6c2d699d 100644 --- a/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h +++ b/components/viz/service/frame_sinks/direct_layer_tree_frame_sink.h
@@ -42,7 +42,7 @@ Display* display, mojom::DisplayClient* display_client, scoped_refptr<ContextProvider> context_provider, - scoped_refptr<ContextProvider> worker_context_provider, + scoped_refptr<RasterContextProvider> worker_context_provider, scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, SharedBitmapManager* shared_bitmap_manager);
diff --git a/components/viz/test/test_layer_tree_frame_sink.cc b/components/viz/test/test_layer_tree_frame_sink.cc index 1fba2ada..8b270d4 100644 --- a/components/viz/test/test_layer_tree_frame_sink.cc +++ b/components/viz/test/test_layer_tree_frame_sink.cc
@@ -22,7 +22,7 @@ TestLayerTreeFrameSink::TestLayerTreeFrameSink( scoped_refptr<ContextProvider> compositor_context_provider, - scoped_refptr<ContextProvider> worker_context_provider, + scoped_refptr<RasterContextProvider> worker_context_provider, SharedBitmapManager* shared_bitmap_manager, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, const RendererSettings& renderer_settings,
diff --git a/components/viz/test/test_layer_tree_frame_sink.h b/components/viz/test/test_layer_tree_frame_sink.h index 563ecfe..2c5d640a 100644 --- a/components/viz/test/test_layer_tree_frame_sink.h +++ b/components/viz/test/test_layer_tree_frame_sink.h
@@ -55,7 +55,7 @@ // is out-of-process and can't return resources synchronously. TestLayerTreeFrameSink( scoped_refptr<ContextProvider> compositor_context_provider, - scoped_refptr<ContextProvider> worker_context_provider, + scoped_refptr<RasterContextProvider> worker_context_provider, SharedBitmapManager* shared_bitmap_manager, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, const RendererSettings& renderer_settings,
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc index 1e632db..ea75202 100644 --- a/content/browser/compositor/gpu_process_transport_factory.cc +++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -406,9 +406,10 @@ { // Note: If context is lost, we delete reference after releasing the // lock. - viz::ContextProvider::ScopedContextLock lock( + viz::RasterContextProvider::ScopedRasterContextLock lock( shared_worker_context_provider_.get()); - lost = lock.RasterContext()->GetGraphicsResetStatusKHR() != GL_NO_ERROR; + lost = + lock.RasterInterface()->GetGraphicsResetStatusKHR() != GL_NO_ERROR; } if (lost) shared_worker_context_provider_ = nullptr; @@ -648,6 +649,9 @@ // The |delegated_output_surface| is given back to the compositor, it // delegates to the Display as its root surface. Importantly, it shares the // same ContextProvider as the Display's output surface. + scoped_refptr<viz::RasterContextProvider> worker_context_provider; + if (shared_worker_context_provider_) + worker_context_provider = shared_worker_context_provider_; auto layer_tree_frame_sink = vulkan_context_provider ? std::make_unique<viz::DirectLayerTreeFrameSink>( @@ -660,7 +664,7 @@ compositor->frame_sink_id(), GetHostFrameSinkManager(), GetFrameSinkManager(), data->display.get(), data->display_client.get(), context_provider, - shared_worker_context_provider_, compositor->task_runner(), + worker_context_provider, compositor->task_runner(), GetGpuMemoryBufferManager(), viz::ServerSharedBitmapManager::current()); data->display->Resize(compositor->size());
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc index 8bfdd5a..b76a632 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -463,12 +463,13 @@ params.enable_surface_synchronization = features::IsSurfaceSynchronizationEnabled(); - scoped_refptr<ui::ContextProviderCommandBuffer> compositor_context; - scoped_refptr<ui::ContextProviderCommandBuffer> worker_context; + scoped_refptr<viz::ContextProvider> compositor_context; + scoped_refptr<viz::RasterContextProvider> worker_context; if (gpu_compositing) { // Only pass the contexts to the compositor if it will use gpu compositing. compositor_context = compositor_context_provider_; - worker_context = shared_worker_context_provider_; + if (shared_worker_context_provider_) + worker_context = shared_worker_context_provider_; } compositor->SetLayerTreeFrameSink( std::make_unique<viz::ClientLayerTreeFrameSink>(
diff --git a/content/browser/devtools/protocol/system_info_handler.cc b/content/browser/devtools/protocol/system_info_handler.cc index 2606838..87b0509 100644 --- a/content/browser/devtools/protocol/system_info_handler.cc +++ b/content/browser/devtools/protocol/system_info_handler.cc
@@ -13,7 +13,7 @@ #include "base/memory/ptr_util.h" #include "base/strings/utf_string_conversions.h" #include "content/browser/gpu/compositor_util.h" -#include "content/public/browser/gpu_data_manager.h" +#include "content/browser/gpu/gpu_data_manager_impl.h" #include "gpu/config/gpu_feature_type.h" #include "gpu/config/gpu_info.h" #include "gpu/config/gpu_switches.h" @@ -97,7 +97,7 @@ } void SendGetInfoResponse(std::unique_ptr<GetInfoCallback> callback) { - gpu::GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo(); + gpu::GPUInfo gpu_info = GpuDataManagerImpl::GetInstance()->GetGPUInfo(); std::unique_ptr<protocol::Array<GPUDevice>> devices = protocol::Array<GPUDevice>::create(); devices->addItem(GPUDeviceToProtocol(gpu_info.gpu)); @@ -153,13 +153,13 @@ weak_factory_.GetWeakPtr()), base::TimeDelta::FromMilliseconds(kGPUInfoWatchdogTimeoutMs)); - GpuDataManager::GetInstance()->AddObserver(this); - // There's no other method available to request just essential GPU info. - GpuDataManager::GetInstance()->RequestCompleteGpuInfoIfNeeded(); + GpuDataManagerImpl::GetInstance()->AddObserver(this); + OnGpuInfoUpdate(); } void OnGpuInfoUpdate() override { - UnregisterAndSendResponse(); + if (GpuDataManagerImpl::GetInstance()->IsGpuFeatureInfoAvailable()) + UnregisterAndSendResponse(); } void OnGpuProcessCrashed(base::TerminationStatus exit_code) override { @@ -168,11 +168,11 @@ void ObserverWatchdogCallback() { DCHECK_CURRENTLY_ON(BrowserThread::UI); - UnregisterAndSendResponse(); + CHECK(false) << "Gathering system GPU info took more than 5 seconds."; } void UnregisterAndSendResponse() { - GpuDataManager::GetInstance()->RemoveObserver(this); + GpuDataManagerImpl::GetInstance()->RemoveObserver(this); SendGetInfoResponse(std::move(callback_)); delete this; } @@ -193,29 +193,11 @@ SystemInfo::Dispatcher::wire(dispatcher, this); } -void SystemInfoHandler::GetInfo( - std::unique_ptr<GetInfoCallback> callback) { - std::string reason; - if (!GpuDataManager::GetInstance()->GpuAccessAllowed(&reason) || - GpuDataManager::GetInstance()->IsEssentialGpuInfoAvailable() || - base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kGpuTestingNoCompleteInfoCollection)) { - // The GpuDataManager already has all of the information needed to make - // GPU-based blacklisting decisions. Post a task to give it to the - // client asynchronously. - // - // Waiting for complete GPU info in the if-test above seems to - // frequently hit internal timeouts in the launching of the unsandboxed - // GPU process in debug builds on Windows. - BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, - base::BindOnce(&SendGetInfoResponse, - base::Passed(std::move(callback)))); - } else { - // We will be able to get more information from the GpuDataManager. - // Register a transient observer with it to call us back when the - // information is available. - new SystemInfoHandlerGpuObserver(std::move(callback)); - } +void SystemInfoHandler::GetInfo(std::unique_ptr<GetInfoCallback> callback) { + // We will be able to get more information from the GpuDataManager. + // Register a transient observer with it to call us back when the + // information is available. + new SystemInfoHandlerGpuObserver(std::move(callback)); } } // namespace protocol
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc index e76727b..a7b3ef7 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -51,6 +51,10 @@ void Wait(); void Cancel(); + void AddCallback(gpu::GpuChannelEstablishedCallback callback) { + established_callbacks_.push_back(std::move(callback)); + } + const scoped_refptr<gpu::GpuChannelHost>& gpu_channel() { return gpu_channel_; } @@ -66,8 +70,11 @@ const gpu::GpuFeatureInfo& gpu_feature_info, GpuProcessHost::EstablishChannelStatus status); void FinishOnIO(); + void FinishAndRunCallbacksOnMain(); void FinishOnMain(); + void RunCallbacksOnMain(); + std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_; base::WaitableEvent event_; const int gpu_client_id_; const uint64_t gpu_client_tracing_id_; @@ -158,8 +165,15 @@ event_.Signal(); main_task_runner_->PostTask( FROM_HERE, - base::BindOnce( - &BrowserGpuChannelHostFactory::EstablishRequest::FinishOnMain, this)); + base::BindOnce(&BrowserGpuChannelHostFactory::EstablishRequest:: + FinishAndRunCallbacksOnMain, + this)); +} + +void BrowserGpuChannelHostFactory::EstablishRequest:: + FinishAndRunCallbacksOnMain() { + FinishOnMain(); + RunCallbacksOnMain(); } void BrowserGpuChannelHostFactory::EstablishRequest::FinishOnMain() { @@ -171,6 +185,13 @@ } } +void BrowserGpuChannelHostFactory::EstablishRequest::RunCallbacksOnMain() { + std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks; + established_callbacks_.swap(established_callbacks); + for (auto&& callback : std::move(established_callbacks)) + std::move(callback).Run(gpu_channel_); +} + void BrowserGpuChannelHostFactory::EstablishRequest::Wait() { DCHECK(main_task_runner_->BelongsToCurrentThread()); { @@ -189,6 +210,7 @@ void BrowserGpuChannelHostFactory::EstablishRequest::Cancel() { DCHECK(main_task_runner_->BelongsToCurrentThread()); finished_ = true; + established_callbacks_.clear(); } void BrowserGpuChannelHostFactory::CloseChannel() { @@ -266,10 +288,12 @@ } if (!callback.is_null()) { - if (gpu_channel_.get()) + if (gpu_channel_.get()) { std::move(callback).Run(gpu_channel_); - else - established_callbacks_.push_back(std::move(callback)); + } else { + DCHECK(pending_request_); + pending_request_->AddCallback(std::move(callback)); + } } } @@ -310,11 +334,6 @@ timeout_.Stop(); if (gpu_channel_) GetContentClient()->SetGpuInfo(gpu_channel_->gpu_info()); - - std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks; - established_callbacks_.swap(established_callbacks); - for (auto&& callback : std::move(established_callbacks)) - std::move(callback).Run(gpu_channel_); } void BrowserGpuChannelHostFactory::RestartTimeout() {
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.h b/content/browser/gpu/browser_gpu_channel_host_factory.h index ce1df5d..12aa00c 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.h +++ b/content/browser/gpu/browser_gpu_channel_host_factory.h
@@ -63,7 +63,6 @@ scoped_refptr<gpu::GpuChannelHost> gpu_channel_; std::unique_ptr<BrowserGpuMemoryBufferManager> gpu_memory_buffer_manager_; scoped_refptr<EstablishRequest> pending_request_; - std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_; base::OneShotTimer timeout_;
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc index 14f23a5..df74b4c1 100644 --- a/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc
@@ -25,6 +25,7 @@ #include "gpu/command_buffer/common/gpu_memory_buffer_support.h" #include "gpu/config/gpu_feature_type.h" #include "gpu/config/gpu_finch_features.h" +#include "gpu/config/gpu_switches.h" #include "gpu/ipc/host/gpu_memory_buffer_support.h" #include "media/media_features.h" #include "ui/gl/gl_switches.h" @@ -33,108 +34,102 @@ namespace { -static bool IsGpuRasterizationBlacklisted() { - GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); - return manager->IsFeatureBlacklisted( - gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION); -} - -const char kGpuCompositingFeatureName[] = "gpu_compositing"; -const char kWebGLFeatureName[] = "webgl"; -const char kRasterizationFeatureName[] = "rasterization"; -const char kMultipleRasterThreadsFeatureName[] = "multiple_raster_threads"; -const char kNativeGpuMemoryBuffersFeatureName[] = "native_gpu_memory_buffers"; -const char kWebGL2FeatureName[] = "webgl2"; -const char kCheckerImagingFeatureName[] = "checker_imaging"; - const int kMinRasterThreads = 1; const int kMaxRasterThreads = 4; const int kMinMSAASampleCount = 0; -struct GpuFeatureInfo { +struct GpuFeatureData { std::string name; - bool blocked; + gpu::GpuFeatureStatus status; bool disabled; std::string disabled_description; bool fallback_to_software; }; -const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) { +bool IsForceGpuRasterizationEnabled() { + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + return command_line->HasSwitch(switches::kForceGpuRasterization); +} + +const GpuFeatureData GetGpuFeatureData(size_t index, bool* eof) { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); + DCHECK(manager->IsGpuFeatureInfoAvailable()); - const GpuFeatureInfo kGpuFeatureInfo[] = { - {"2d_canvas", - manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS), - command_line.HasSwitch(switches::kDisableAccelerated2dCanvas), - "Accelerated 2D canvas is unavailable: either disabled via blacklist or" - " the command line.", - true}, - {kGpuCompositingFeatureName, - manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING), - command_line.HasSwitch(switches::kDisableGpuCompositing), - "Gpu compositing has been disabled, either via blacklist, about:flags" - " or the command line. The browser will fall back to software compositing" - " and hardware acceleration will be unavailable.", - true}, - {kWebGLFeatureName, !manager->IsWebGLEnabled(), - command_line.HasSwitch(switches::kDisableWebGL), - "WebGL has been disabled via blacklist or the command line.", false}, - {"flash_3d", manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH3D), - command_line.HasSwitch(switches::kDisableFlash3d), - "Using 3d in flash has been disabled, either via blacklist, about:flags or" - " the command line.", - true}, - {"flash_stage3d", - manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D), - command_line.HasSwitch(switches::kDisableFlashStage3d), - "Using Stage3d in Flash has been disabled, either via blacklist," - " about:flags or the command line.", - true}, - {"flash_stage3d_baseline", - manager->IsFeatureBlacklisted( - gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE) || - manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D), - command_line.HasSwitch(switches::kDisableFlashStage3d), - "Using Stage3d Baseline profile in Flash has been disabled, either" - " via blacklist, about:flags or the command line.", - true}, - {"video_decode", - manager->IsFeatureBlacklisted( - gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), - command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), - "Accelerated video decode has been disabled, either via blacklist," - " about:flags or the command line.", - true}, - {kRasterizationFeatureName, - IsGpuRasterizationBlacklisted() && !IsGpuRasterizationEnabled() && - !IsForceGpuRasterizationEnabled(), - !IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled() && - !IsGpuRasterizationBlacklisted(), - "Accelerated rasterization has been disabled, either via blacklist," - " about:flags or the command line.", - true}, - {kMultipleRasterThreadsFeatureName, false, - NumberOfRendererRasterThreads() == 1, "Raster is using a single thread.", - false}, - {kNativeGpuMemoryBuffersFeatureName, false, - !gpu::AreNativeGpuMemoryBuffersEnabled(), - "Native GpuMemoryBuffers have been disabled, either via about:flags" - " or command line.", - true}, - {kWebGL2FeatureName, !manager->IsWebGL2Enabled(), - command_line.HasSwitch(switches::kDisableWebGL) || - command_line.HasSwitch(switches::kDisableWebGL2), - "WebGL2 has been disabled via blacklist or the command line.", false}, - {kCheckerImagingFeatureName, false, !IsCheckerImagingEnabled(), - "Checker-imaging has been disabled via finch trial or the command line.", - false}, + const GpuFeatureData kGpuFeatureData[] = { + {"2d_canvas", + manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS), + command_line.HasSwitch(switches::kDisableAccelerated2dCanvas), + "Accelerated 2D canvas is unavailable: either disabled via blacklist or" + " the command line.", + true}, + {"gpu_compositing", + manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING), + command_line.HasSwitch(switches::kDisableGpuCompositing), + "Gpu compositing has been disabled, either via blacklist, about:flags" + " or the command line. The browser will fall back to software " + "compositing" + " and hardware acceleration will be unavailable.", + true}, + {"webgl", + manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL), + command_line.HasSwitch(switches::kDisableWebGL), + "WebGL has been disabled via blacklist or the command line.", false}, + {"flash_3d", manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_FLASH3D), + command_line.HasSwitch(switches::kDisableFlash3d), + "Using 3d in flash has been disabled, either via blacklist, about:flags " + "or" + " the command line.", + true}, + {"flash_stage3d", + manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D), + command_line.HasSwitch(switches::kDisableFlashStage3d), + "Using Stage3d in Flash has been disabled, either via blacklist," + " about:flags or the command line.", + true}, + {"flash_stage3d_baseline", + manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE), + command_line.HasSwitch(switches::kDisableFlashStage3d), + "Using Stage3d Baseline profile in Flash has been disabled, either" + " via blacklist, about:flags or the command line.", + true}, + {"video_decode", + manager->GetFeatureStatus( + gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE), + command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), + "Accelerated video decode has been disabled, either via blacklist," + " about:flags or the command line.", + true}, + {"rasterization", + manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION), + (command_line.HasSwitch(switches::kDisableGpuRasterization) && + !IsForceGpuRasterizationEnabled()), + "Accelerated rasterization has been disabled, either via blacklist," + " about:flags or the command line.", + true}, + {"multiple_raster_threads", gpu::kGpuFeatureStatusEnabled, + NumberOfRendererRasterThreads() == 1, "Raster is using a single thread.", + false}, + {"native_gpu_memory_buffers", gpu::kGpuFeatureStatusEnabled, + !gpu::AreNativeGpuMemoryBuffersEnabled(), + "Native GpuMemoryBuffers have been disabled, either via about:flags" + " or command line.", + true}, + {"webgl2", + manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL2), + (command_line.HasSwitch(switches::kDisableWebGL) || + command_line.HasSwitch(switches::kDisableWebGL2)), + "WebGL2 has been disabled via blacklist or the command line.", false}, + {"checker_imaging", gpu::kGpuFeatureStatusEnabled, + !IsCheckerImagingEnabled(), + "Checker-imaging has been disabled via finch trial or the command line.", + false}, }; - DCHECK(index < arraysize(kGpuFeatureInfo)); - *eof = (index == arraysize(kGpuFeatureInfo) - 1); - return kGpuFeatureInfo[index]; + DCHECK(index < arraysize(kGpuFeatureData)); + *eof = (index == arraysize(kGpuFeatureData) - 1); + return kGpuFeatureData[index]; } } // namespace @@ -213,17 +208,6 @@ #endif } -bool IsGpuRasterizationEnabled() { - GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); - return manager->IsFeatureEnabled(gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION); -} - -bool IsForceGpuRasterizationEnabled() { - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); - return command_line.HasSwitch(switches::kForceGpuRasterization); -} - int GpuRasterizationMSAASampleCount() { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); @@ -304,40 +288,37 @@ bool eof = false; for (size_t i = 0; !eof; ++i) { - const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); + const GpuFeatureData gpu_feature_data = GetGpuFeatureData(i, &eof); std::string status; - if (gpu_feature_info.disabled) { + if (gpu_feature_data.disabled || gpu_access_blocked) { status = "disabled"; - if (gpu_feature_info.fallback_to_software) + if (gpu_feature_data.fallback_to_software) status += "_software"; else status += "_off"; - } else if (gpu_feature_info.blocked || - gpu_access_blocked) { - status = "unavailable"; - if (gpu_feature_info.fallback_to_software) - status += "_software"; - else - status += "_off"; + } else if (gpu_feature_data.status == gpu::kGpuFeatureStatusBlacklisted) { + status = "unavailable_off"; + } else if (gpu_feature_data.status == gpu::kGpuFeatureStatusSoftware) { + status = "unavailable_software"; } else { status = "enabled"; - if ((gpu_feature_info.name == kWebGLFeatureName || - gpu_feature_info.name == kWebGL2FeatureName) && - manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) + if ((gpu_feature_data.name == "webgl" || + gpu_feature_data.name == "webgl2") && + (manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING) != + gpu::kGpuFeatureStatusEnabled)) status += "_readback"; - if (gpu_feature_info.name == kRasterizationFeatureName) { + if (gpu_feature_data.name == "rasterization") { if (IsForceGpuRasterizationEnabled()) status += "_force"; } - if (gpu_feature_info.name == kMultipleRasterThreadsFeatureName) { + if (gpu_feature_data.name == "multiple_raster_threads") { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); if (command_line.HasSwitch(switches::kNumRasterThreads)) status += "_force"; - } - if (gpu_feature_info.name == kMultipleRasterThreadsFeatureName) status += "_on"; - if (gpu_feature_info.name == kCheckerImagingFeatureName) { + } + if (gpu_feature_data.name == "checker_imaging") { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); if (command_line.HasSwitch(cc::switches::kEnableCheckerImaging)) @@ -345,14 +326,7 @@ status += "_on"; } } - if ((gpu_feature_info.name == kWebGLFeatureName || - gpu_feature_info.name == kWebGL2FeatureName) && - (gpu_feature_info.blocked || gpu_access_blocked) && - manager->ShouldUseSwiftShader()) { - status = "unavailable_software"; - } - - feature_status_dict->SetString(gpu_feature_info.name, status); + feature_status_dict->SetString(gpu_feature_data.name, status); } return feature_status_dict; } @@ -380,14 +354,13 @@ bool eof = false; for (size_t i = 0; !eof; ++i) { - const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); - if (gpu_feature_info.disabled) { + const GpuFeatureData gpu_feature_data = GetGpuFeatureData(i, &eof); + if (gpu_feature_data.disabled) { auto problem = std::make_unique<base::DictionaryValue>(); - problem->SetString( - "description", gpu_feature_info.disabled_description); + problem->SetString("description", gpu_feature_data.disabled_description); problem->Set("crBugs", std::make_unique<base::ListValue>()); auto disabled_features = std::make_unique<base::ListValue>(); - disabled_features->AppendString(gpu_feature_info.name); + disabled_features->AppendString(gpu_feature_data.name); problem->Set("affectedGpuSettings", std::move(disabled_features)); problem->SetString("tag", "disabledFeatures"); problem_list->Append(std::move(problem));
diff --git a/content/browser/gpu/compositor_util.h b/content/browser/gpu/compositor_util.h index d8e8add3..f784070 100644 --- a/content/browser/gpu/compositor_util.h +++ b/content/browser/gpu/compositor_util.h
@@ -26,16 +26,10 @@ // Returns true if all compositor resources should use GPU memory buffers. CONTENT_EXPORT bool IsGpuMemoryBufferCompositorResourcesEnabled(); -// Returns true if gpu rasterization is on (via flags) for the renderer. -CONTENT_EXPORT bool IsGpuRasterizationEnabled(); - // Returns the number of multisample antialiasing samples (via flags) for // GPU rasterization. CONTENT_EXPORT int GpuRasterizationMSAASampleCount(); -// Returns true if force-gpu-rasterization is on (via flags) for the renderer. -CONTENT_EXPORT bool IsForceGpuRasterizationEnabled(); - // Returns the number of raster threads to use for compositing. CONTENT_EXPORT int NumberOfRendererRasterThreads();
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc index 8a471e3f..d87bee0 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -111,6 +111,17 @@ return private_->IsCompleteGpuInfoAvailable(); } +bool GpuDataManagerImpl::IsGpuFeatureInfoAvailable() const { + base::AutoLock auto_lock(lock_); + return private_->IsGpuFeatureInfoAvailable(); +} + +gpu::GpuFeatureStatus GpuDataManagerImpl::GetFeatureStatus( + gpu::GpuFeatureType feature) const { + base::AutoLock auto_lock(lock_); + return private_->GetFeatureStatus(feature); +} + void GpuDataManagerImpl::RequestVideoMemoryUsageStatsUpdate( const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& callback) const {
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h index 2626ed24..7bde29e 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -94,6 +94,9 @@ void GetDisabledExtensions(std::string* disabled_extensions) const override; void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; + bool IsGpuFeatureInfoAvailable() const; + gpu::GpuFeatureStatus GetFeatureStatus(gpu::GpuFeatureType feature) const; + // This collects preliminary GPU info, load GpuBlacklist, and compute the // preliminary blacklisted features; it should only be called at browser // startup time in UI thread before the IO restriction is turned on.
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc index a0d0d3c..1ac8a978 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -448,6 +448,16 @@ return IsEssentialGpuInfoAvailable(); } +bool GpuDataManagerImplPrivate::IsGpuFeatureInfoAvailable() const { + return gpu_feature_info_.IsValid(); +} + +gpu::GpuFeatureStatus GpuDataManagerImplPrivate::GetFeatureStatus( + gpu::GpuFeatureType feature) const { + DCHECK(feature >= 0 && feature < gpu::NUMBER_OF_GPU_FEATURE_TYPES); + return gpu_feature_info_.status_values[feature]; +} + void GpuDataManagerImplPrivate::RequestVideoMemoryUsageStatsUpdate( const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& callback) const { @@ -655,11 +665,8 @@ void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo( const gpu::GpuFeatureInfo& gpu_feature_info) { - if (!use_swiftshader_) { - gpu_feature_info_ = gpu_feature_info; - UpdateDriverBugListStats(gpu_feature_info); - NotifyGpuInfoUpdate(); - } + gpu_feature_info_ = gpu_feature_info; + UpdateDriverBugListStats(gpu_feature_info); } gpu::GpuFeatureInfo GpuDataManagerImplPrivate::GetGpuFeatureInfo() const { @@ -778,7 +785,9 @@ } card_blacklisted_ = true; - + gpu::GpuFeatureInfo gpu_feature_info = + gpu::ComputeGpuFeatureInfoWithHardwareAccelerationDisabled(); + UpdateGpuFeatureInfo(gpu_feature_info); for (int i = 0; i < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++i) blacklisted_features_.insert(i);
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h index f40bc32..e805de0 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -51,6 +51,8 @@ void RequestCompleteGpuInfoIfNeeded(); bool IsEssentialGpuInfoAvailable() const; bool IsCompleteGpuInfoAvailable() const; + bool IsGpuFeatureInfoAvailable() const; + gpu::GpuFeatureStatus GetFeatureStatus(gpu::GpuFeatureType feature) const; void RequestVideoMemoryUsageStatsUpdate( const base::Callback<void(const gpu::VideoMemoryUsageStats& stats)>& callback) const;
diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc index c25e2426..8bd2721 100644 --- a/content/browser/gpu/gpu_ipc_browsertests.cc +++ b/content/browser/gpu/gpu_ipc_browsertests.cc
@@ -162,6 +162,13 @@ gpu_channel_host_ = std::move(gpu_channel_host); } + void SignalAndQuitLoop(bool* event, + base::RunLoop* run_loop, + scoped_refptr<gpu::GpuChannelHost> gpu_channel_host) { + Signal(event, std::move(gpu_channel_host)); + run_loop->Quit(); + } + protected: gpu::GpuChannelEstablishFactory* GetFactory() { return BrowserMainLoop::GetInstance()->gpu_channel_establish_factory(); @@ -217,6 +224,34 @@ } #endif +// Test fails on Chromeos + Mac, flaky on Windows because UI Compositor +// establishes a GPU channel. +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#define MAYBE_CallbacksDontRunOnEstablishSync CallbacksDontRunOnEstablishSync +#else +#define MAYBE_CallbacksDontRunOnEstablishSync \ + DISABLED_CallbacksDontRunOnEstablishSync +#endif +IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, + MAYBE_CallbacksDontRunOnEstablishSync) { + DCHECK(!IsChannelEstablished()); + bool event = false; + base::RunLoop run_loop; + GetFactory()->EstablishGpuChannel( + base::BindOnce(&BrowserGpuChannelHostFactoryTest::SignalAndQuitLoop, + base::Unretained(this), &event, &run_loop)); + + scoped_refptr<gpu::GpuChannelHost> gpu_channel = + GetFactory()->EstablishGpuChannelSync(); + + // Expect async callback didn't run yet. + EXPECT_FALSE(event); + + run_loop.Run(); + EXPECT_TRUE(event); + EXPECT_EQ(gpu_channel.get(), GetGpuChannel()); +} + // Test fails on Windows because GPU Channel set-up fails. #if !defined(OS_WIN) #define MAYBE_GrContextKeepsGpuChannelAlive GrContextKeepsGpuChannelAlive
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index e742f659..75ddcc2 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc
@@ -900,10 +900,10 @@ } GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); - if (!gpu_data_manager->ShouldUseSwiftShader()) { - gpu_data_manager->UpdateGpuInfo(gpu_info); - gpu_data_manager->UpdateGpuFeatureInfo(gpu_feature_info); - } + // Update GpuFeatureInfo first, because UpdateGpuInfo() will notify all + // listeners. + gpu_data_manager->UpdateGpuFeatureInfo(gpu_feature_info); + gpu_data_manager->UpdateGpuInfo(gpu_info); RunRequestGPUInfoCallbacks(gpu_data_manager->GetGPUInfo()); }
diff --git a/content/renderer/android/synchronous_layer_tree_frame_sink.cc b/content/renderer/android/synchronous_layer_tree_frame_sink.cc index db0e046..ec01c52 100644 --- a/content/renderer/android/synchronous_layer_tree_frame_sink.cc +++ b/content/renderer/android/synchronous_layer_tree_frame_sink.cc
@@ -111,7 +111,7 @@ SynchronousLayerTreeFrameSink::SynchronousLayerTreeFrameSink( scoped_refptr<viz::ContextProvider> context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, int routing_id,
diff --git a/content/renderer/android/synchronous_layer_tree_frame_sink.h b/content/renderer/android/synchronous_layer_tree_frame_sink.h index 7e614ab8..a273d304 100644 --- a/content/renderer/android/synchronous_layer_tree_frame_sink.h +++ b/content/renderer/android/synchronous_layer_tree_frame_sink.h
@@ -70,7 +70,7 @@ public: SynchronousLayerTreeFrameSink( scoped_refptr<viz::ContextProvider> context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, int routing_id,
diff --git a/content/renderer/layout_test_dependencies.h b/content/renderer/layout_test_dependencies.h index 2fdb236e..167d9be1 100644 --- a/content/renderer/layout_test_dependencies.h +++ b/content/renderer/layout_test_dependencies.h
@@ -25,6 +25,7 @@ namespace viz { class ContextProvider; +class RasterContextProvider; } namespace content { @@ -40,7 +41,7 @@ int32_t routing_id, scoped_refptr<gpu::GpuChannelHost> gpu_channel, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, CompositorDependencies* deps) = 0;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 4190abe..f3d6424 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -2434,10 +2434,9 @@ // Try to reuse existing shared worker context provider. if (shared_worker_context_provider_) { // Note: If context is lost, delete reference after releasing the lock. - viz::ContextProvider::ScopedContextLock lock( + viz::RasterContextProvider::ScopedRasterContextLock lock( shared_worker_context_provider_.get()); - if (shared_worker_context_provider_->RasterContext() - ->GetGraphicsResetStatusKHR() == GL_NO_ERROR) + if (lock.RasterInterface()->GetGraphicsResetStatusKHR() == GL_NO_ERROR) return shared_worker_context_provider_; }
diff --git a/content/test/gpu/gpu_tests/gpu_process_expectations.py b/content/test/gpu/gpu_tests/gpu_process_expectations.py index 50a2e0c..145c25bb 100644 --- a/content/test/gpu/gpu_tests/gpu_process_expectations.py +++ b/content/test/gpu/gpu_tests/gpu_process_expectations.py
@@ -8,18 +8,11 @@ class GpuProcessExpectations(GpuTestExpectations): def SetExpectations(self): - # Accelerated 2D canvas is not available on Linux due to driver instability - self.Fail('GpuProcess_canvas2d', ['linux'], bug=254724) - self.Fail('GpuProcess_video', ['linux'], bug=257109) # Chrome on Android doesn't support software fallback. - self.Skip('GpuProcess_no_gpu_process', ['android'], bug=643282) self.Skip('GpuProcess_skip_gpu_process', ['android'], bug=(610951, 610023)) - # TODO(zmo): Consider deleting this test on Linux/Win due to SwiftShader? - self.Fail('GpuProcess_no_gpu_process', ['win', 'linux']) - # Chrome on Windows and Linux create a GPU process that uses SwiftShader # when using either --disable-gpu or a blacklisted GPU. self.Skip('GpuProcess_skip_gpu_process', ['win', 'linux'], bug=630728) @@ -42,7 +35,3 @@ # Seems to have become flaky on Windows recently. self.Flaky('GpuProcess_only_one_workaround', ['win'], bug=700522) - - # TODO(zmo): Enable this test once about:gpu status reporting is wired - # with GpuFeatureInfo from GPU process. - self.Fail('GpuProcess_readback_webgl_gpu_process', ['linux'])
diff --git a/content/test/gpu/gpu_tests/gpu_process_integration_test.py b/content/test/gpu/gpu_tests/gpu_process_integration_test.py index 8381c54..619fd71 100644 --- a/content/test/gpu/gpu_tests/gpu_process_integration_test.py +++ b/content/test/gpu/gpu_tests/gpu_process_integration_test.py
@@ -71,7 +71,6 @@ ('GpuProcess_webgl', 'gpu/functional_webgl.html'), ('GpuProcess_video', 'gpu/functional_video.html'), ('GpuProcess_gpu_info_complete', 'gpu/functional_3d_css.html'), - ('GpuProcess_no_gpu_process', 'about:blank'), ('GpuProcess_driver_bug_workarounds_in_gpu_process', 'chrome:gpu'), ('GpuProcess_readback_webgl_gpu_process', 'chrome:gpu'), ('GpuProcess_driver_bug_workarounds_upon_gl_renderer', @@ -240,42 +239,11 @@ self.fail('Browser must support GPU aux attributes') if not 'gl_renderer' in system_info.gpu.aux_attributes: self.fail('Browser must have gl_renderer in aux attribs') - if len(system_info.gpu.aux_attributes['gl_renderer']) <= 0: + if (sys.platform != 'darwin' and + len(system_info.gpu.aux_attributes['gl_renderer']) <= 0): + # On MacOSX we don't create a context to collect GL strings.1 self.fail('Must have a non-empty gl_renderer string') - def _GpuProcess_no_gpu_process(self, test_path): - options = self.__class__._original_finder_options.browser_options - if options.browser_type.startswith('android'): - # Android doesn't support starting up the browser without any - # GPU process. This test is skipped on Android in - # gpu_process_expectations.py, but we must at least be able to - # bring up the browser in order to detect that the test - # shouldn't run. Faking a vendor and device ID can get the - # browser into a state where it won't launch. - return - elif sys.platform in ('cygwin', 'win32'): - # Hit id 34 from kSoftwareRenderingListEntries. - self.RestartBrowserIfNecessaryWithArgs([ - '--gpu-testing-vendor-id=0x5333', - '--gpu-testing-device-id=0x8811']) - elif sys.platform.startswith('linux'): - # Hit id 50 from kSoftwareRenderingListEntries. - self.RestartBrowserIfNecessaryWithArgs([ - '--gpu-no-complete-info-collection', - '--gpu-testing-vendor-id=0x10de', - '--gpu-testing-device-id=0x0de1', - '--gpu-testing-gl-vendor=VMware', - '--gpu-testing-gl-renderer=softpipe', - '--gpu-testing-gl-version="2.1 Mesa 10.1"']) - elif sys.platform == 'darwin': - # Hit id 112 from kSoftwareRenderingListEntries. - self.RestartBrowserIfNecessaryWithArgs([ - '--gpu-testing-vendor-id=0x8086', - '--gpu-testing-device-id=0x0116']) - self._Navigate(test_path) - if self.tab.EvaluateJavaScript('chrome.gpuBenchmarking.hasGpuProcess()'): - self.fail('GPU process detected') - def _GpuProcess_driver_bug_workarounds_in_gpu_process(self, test_path): self.RestartBrowserIfNecessaryWithArgs([ '--use_gpu_driver_workaround_for_testing']) @@ -301,18 +269,12 @@ 'browserBridge.gpuInfo.featureStatus.featureStatus') result = True for name, status in feature_status_list.items(): - if name == 'multiple_raster_threads': - result = result and status == 'enabled_on' - elif name == 'native_gpu_memory_buffers': - result = result and status == 'disabled_software' - elif name == 'webgl': + if name == 'webgl': result = result and status == 'enabled_readback' elif name == 'webgl2': - result = result and status == 'unavailable_software' - elif name == 'checker_imaging': - pass + result = result and status == 'unavailable_off' else: - result = result and status == 'unavailable_software' + pass if not result: self.fail('WebGL readback setup failed: %s' % feature_status_list)
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc index 3b6ac86..c557096 100644 --- a/content/test/layouttest_support.cc +++ b/content/test/layouttest_support.cc
@@ -312,7 +312,7 @@ int32_t routing_id, scoped_refptr<gpu::GpuChannelHost> gpu_channel, scoped_refptr<viz::ContextProvider> compositor_context_provider, - scoped_refptr<viz::ContextProvider> worker_context_provider, + scoped_refptr<viz::RasterContextProvider> worker_context_provider, gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, CompositorDependencies* deps) override { // This could override the GpuChannel for a LayerTreeFrameSink that was
diff --git a/docs/speed/perf_bot_sheriffing.md b/docs/speed/perf_bot_sheriffing.md index 1660697..f812b1537 100644 --- a/docs/speed/perf_bot_sheriffing.md +++ b/docs/speed/perf_bot_sheriffing.md
@@ -331,97 +331,63 @@ ### Disabling Telemetry Tests - -If the test is a telemetry test, its name will have a '.' in it, such as -`thread_times.key_mobile_sites` or `page_cycler.top_10`. The part before the -first dot will be a python file in [tools/perf/benchmarks](https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/benchmarks/). - If a telemetry test is failing and there is no clear culprit to revert immediately, disable the story on the failing platforms. -For example: -* If a single story is failing on a single platform, disable only that story on that platform. -* If multiple stories are failing across all platforms, disable those stories on all platforms. -* If all stories are failing on a single platform, disable all stories on that platform. +You can do this with [Expectations](https://cs.chromium.org/chromium/src/tools/perf/expectations.config). +An expectation is a line in the expectations file in the following format: +``` +reason [ conditions ] benchmark/story [ Skip ] +``` -You can do this with [StoryExpectations](https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/story/expectations.py). +Reasons must be in the format `crbug.com/#`. If the same test is failing and +linked to multiple bugs, an entry for each bug is needed. + +A list of supported conditions can be found [here](https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/story/expectations.py). + +Multiple conditions when listed in a single expectation are treated as logical +_AND_ so a platform must meet all conditions to be disabled. Each failing +platform requires its own expectations entry. To determine which stories are failing in a given run, go to the buildbot page -for that run and search for `Unexpected failures`. +for that run and search for `Unexpected failures` in the failing test entry. Example: -On platform P, story foo is failing on benchmark bar. On the same benchmark on -platform Q, story baz is failing. To disable these stories, go -to where benchmark bar is declared. Using codesearch, you can look for -benchmark\_baz which will likely be in bar.py. This is where you can disable the -story. +On Mac platforms, google\_story is failing on memory\_benchmark. -Once there, find the benchmark's `GetExpectations()` method. Inside there you -should see a `SetExpectations()` method. That is where stories are disabled. - -Buildbot output for failing run on platform P: +Buildbot output for failing run on Mac: ``` -bar.benchmark_baz +memory_benchmark/google_story Bot id: 'buildxxx-xx' ... Unexpected Failures: -* foo +* google_story ``` -Buildbot output for failing run on platform Q +Go to the [expectations config file](https://cs.chromium.org/chromium/src/tools/perf/expectations.config). +Look for a comment showing the benchmarks name. If the benchmark is not present +in the expectations file, you may need to add a new section. Please keep them in +alphabetical ordering. + +It will look similar to this when the above example is done: ``` -bar.benchmark_baz -Bot id: 'buildxxx-xx' -... -Unexpected Failures: -* baz +\# Test Expectation file for telemetry tests. +\# tags: Mac + +\# Benchmark: memory_benchmark +crbug.com/123 [ Mac ] memory_benchmark/google_story [ Skip ] ``` -Code snippet from bar.py benchmark: +In the case that a benchmark is failing in its entirety on a platform that it +should noramally run on, you can temporarily disable it by using an expectation +of this format: ``` -class BarBenchmark(perf_benchmark.PerfBenchmark): - ... - def Name(): - return 'bar.benchmark_baz' - ... - def GetExpectations(self): - class StoryExpectations(story.expectations.StoryExpectations): - def SetExpectations(self): - self.DisableStory( - 'foo', [story.expectations.PLATFORM_P], 'crbug.com/1234') - self.DisableStory( - 'baz', [story.expectations.PLATFORM_Q], 'crbug.com/5678') +crbug.com/123456 [ CONDITIONS ] memory_benchmark/* [ Skip ] ``` -If a story is failing on multiple platforms, you can add more platforms to the -list in the second argument to `DisableStory()`. If the story is failing on -different platforms for different reasons, you can have multiple `DisableStory()` -declarations for the same story with different reasons listed. - -If a particular story isn't applicable to a given platform, it should be -disabled using [CanRunStory](https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/page/shared_page_state.py?type=cs&q=CanRunOnBrowser&l=271). - -To find the currently supported disabling conditions view the [expectations file](https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/story/expectations.py). - -In the case that a benchmark is failing in its entirety on a platfrom that it -should noramally run on, you can temporarily disable it by using -DisableBenchmark(): - -``` -class BarBenchmark(perf_benchmark.PerfBenchmark): - ... - def GetExpectations(self): - class StoryExpectations(story.expectations.StoryExpectations): - def SetExpectations(self): - self.DisableBenchmark([story.expectation.PLATFORM_Q], 'crbug.com/9876') -``` - -If for some reason you are unable to disable at the granularity you would like, -disable the test at the lowest granularity possible and contact rnephew@ to -suggest new disabling criteria. - Disabling CLs can be TBR-ed to anyone in [tools/perf/OWNERS](https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/OWNERS), -but please do **not** submit with NOTRY=true. +As long as a disabling CL touches only tools/perf/expectations.config, you can +use TBR and NOTRY=true to submit the CL immediately. ### Disabling Other Tests
diff --git a/gpu/config/gpu_feature_info.cc b/gpu/config/gpu_feature_info.cc index ec38da1..8d809cef 100644 --- a/gpu/config/gpu_feature_info.cc +++ b/gpu/config/gpu_feature_info.cc
@@ -46,4 +46,10 @@ this->enabled_gpu_driver_bug_workarounds.end(); } +bool GpuFeatureInfo::IsValid() const { + // Check if any feature status is undefined. + return status_values[GPU_FEATURE_TYPE_GPU_COMPOSITING] != + kGpuFeatureStatusUndefined; +} + } // namespace gpu
diff --git a/gpu/config/gpu_feature_info.h b/gpu/config/gpu_feature_info.h index 3545587..3e87aa7 100644 --- a/gpu/config/gpu_feature_info.h +++ b/gpu/config/gpu_feature_info.h
@@ -38,6 +38,9 @@ bool IsWorkaroundEnabled(int32_t workaround) const; + // Return true if GpuFeatureInfo is computed. + bool IsValid() const; + GpuFeatureInfo& operator=(const GpuFeatureInfo&); GpuFeatureInfo& operator=(GpuFeatureInfo&&);
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc index 710230e..63e8a79 100644 --- a/gpu/config/gpu_util.cc +++ b/gpu/config/gpu_util.cc
@@ -301,6 +301,34 @@ } } +GpuFeatureInfo ComputeGpuFeatureInfoWithHardwareAccelerationDisabled() { + GpuFeatureInfo gpu_feature_info; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS] = + kGpuFeatureStatusSoftware; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_GPU_COMPOSITING] = + kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_ACCELERATED_WEBGL] = + kGpuFeatureStatusSoftware; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_FLASH3D] = + kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_FLASH_STAGE3D] = + kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE] = + kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE] = + kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_GPU_RASTERIZATION] = + kGpuFeatureStatusDisabled; + gpu_feature_info.status_values[GPU_FEATURE_TYPE_ACCELERATED_WEBGL2] = + kGpuFeatureStatusSoftware; +#if DCHECK_IS_ON() + for (int ii = 0; ii < NUMBER_OF_GPU_FEATURE_TYPES; ++ii) { + DCHECK_NE(kGpuFeatureStatusUndefined, gpu_feature_info.status_values[ii]); + } +#endif + return gpu_feature_info; +} + GpuFeatureInfo ComputeGpuFeatureInfo(const GPUInfo& gpu_info, base::CommandLine* command_line) { GpuFeatureInfo gpu_feature_info;
diff --git a/gpu/config/gpu_util.h b/gpu/config/gpu_util.h index a850dc2..3115dbc1 100644 --- a/gpu/config/gpu_util.h +++ b/gpu/config/gpu_util.h
@@ -29,6 +29,10 @@ GPU_EXPORT void GetGpuInfoFromCommandLine(const base::CommandLine& command_line, GPUInfo* gpu_info); +// Set GPU feature status if hardware acceleration is disabled. +GPU_EXPORT GpuFeatureInfo +ComputeGpuFeatureInfoWithHardwareAccelerationDisabled(); + // This function should only be called from the GPU process, or the Browser // process while using in-process GPU. This function is safe to call at any // point, and is not dependent on sandbox initialization.
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer.mm b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer.mm index 0220ed3..5f16be93 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer.mm +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer.mm
@@ -18,14 +18,14 @@ #endif namespace { -// Returns whether |web_state|'s last committed NavigationItem has a broken SSL. +// Returns whether |web_state|'s visible NavigationItem has a broken SSL. bool IsWebStateSSLBroken(web::WebState* web_state) { if (!web_state) return false; web::NavigationManager* manager = web_state->GetNavigationManager(); if (!manager) return false; - web::NavigationItem* item = manager->GetLastCommittedItem(); + web::NavigationItem* item = manager->GetVisibleItem(); if (!item) return false; const web::SSLStatus& ssl = item->GetSSL();
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer_unittest.mm b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer_unittest.mm index 11224712..fd48eba6cd 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer_unittest.mm +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_observer_unittest.mm
@@ -78,11 +78,11 @@ TEST_F(FullscreenWebStateObserverTest, DisableForBrokenSSL) { std::unique_ptr<web::NavigationItem> item = web::NavigationItem::Create(); item->GetSSL().security_style = web::SECURITY_STYLE_AUTHENTICATION_BROKEN; - navigation_manager().SetLastCommittedItem(item.get()); + navigation_manager().SetVisibleItem(item.get()); EXPECT_TRUE(model().enabled()); web_state().OnVisibleSecurityStateChanged(); EXPECT_FALSE(model().enabled()); - navigation_manager().SetLastCommittedItem(nullptr); + navigation_manager().SetVisibleItem(nullptr); web_state().OnVisibleSecurityStateChanged(); EXPECT_TRUE(model().enabled()); }
diff --git a/ios/chrome/browser/ui/stack_view/BUILD.gn b/ios/chrome/browser/ui/stack_view/BUILD.gn index 557d44d..c72e723 100644 --- a/ios/chrome/browser/ui/stack_view/BUILD.gn +++ b/ios/chrome/browser/ui/stack_view/BUILD.gn
@@ -52,6 +52,7 @@ "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/keyboard", + "//ios/chrome/browser/ui/main:feature_flags", "//ios/chrome/browser/ui/ntp", "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/browser/ui/tab_switcher", @@ -90,6 +91,7 @@ "//base", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/main:feature_flags", "//ios/chrome/test:test_support", "//ios/testing:ocmock_support", "//ios/web/public/test/fakes",
diff --git a/ios/chrome/browser/ui/stack_view/stack_view_controller.mm b/ios/chrome/browser/ui/stack_view/stack_view_controller.mm index 3a38fa8..634cf55 100644 --- a/ios/chrome/browser/ui/stack_view/stack_view_controller.mm +++ b/ios/chrome/browser/ui/stack_view/stack_view_controller.mm
@@ -12,10 +12,10 @@ #include "base/format_macros.h" #import "base/ios/block_types.h" +#include "base/ios/ios_util.h" #include "base/logging.h" #import "base/mac/bundle_locations.h" #import "base/mac/foundation_util.h" - #include "base/mac/scoped_block.h" #include "base/metrics/histogram_macros.h" #include "base/metrics/user_metrics.h" @@ -36,6 +36,7 @@ #import "ios/chrome/browser/ui/commands/command_dispatcher.h" #import "ios/chrome/browser/ui/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/keyboard/UIKeyCommand+Chrome.h" +#include "ios/chrome/browser/ui/main/main_feature_flags.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.h" #import "ios/chrome/browser/ui/reversed_animation.h" #import "ios/chrome/browser/ui/rtl_geometry.h" @@ -251,9 +252,14 @@ // (including the active set itself changing). - (void)activeCardCountChanged; // Computes and stores the initial card size information that will decide how -// layout is done for the remainder of the stack view's lifetime, and configures -// the card sets accordingly. -- (void)setInitialCardSizing; +// layout is done for the remainder of the stack view's lifetime. +- (void)setInitialCardSizingForSize:(CGSize)size; +// Configures the card sets based on the initial card size and the current size +// of the scroll view. +- (void)configureCardSets; +// Returns |YES| if |viewWillAppear| should perform steps to display cards for +// the first time. +- (BOOL)needsInitialDisplay; // Updates the card sizing and layout for the current device orientation. // If |animates| is true, the size change will be animated, otherwise it will be // done synchronously. @@ -296,9 +302,10 @@ // Returns the size of a single card (at normal zoom). - (CGSize)cardSize; // Returns the size that should be used for cards being displayed in a viewport -// with breadth |breadth|, taking margins into account and preserving the -// content area aspect ratio. -- (CGSize)cardSizeForBreadth:(CGFloat)breadth; +// with breadth |breadth| and a scrollview of size |scrollViewSize|, taking +// margins into account and preserving the content area aspect ratio. +- (CGSize)cardSizeForBreadth:(CGFloat)breadth + scrollViewSize:(CGSize)scrollViewSize; // Returns the amount that |point| is offset on the current scroll axis. - (CGFloat)scrollOffsetAmountForPoint:(CGPoint)point; // Returns the amount that |position| is offset on the current scroll axis. @@ -499,6 +506,10 @@ // |YES| if the stack view has been told to restore internal state, but has // not yet become active. BOOL _preparingForActive; + // |YES| if initial card sizes have been computed but cards have not yet been + // laid out for the first time. This is only used when the + // TabSwitcherPresentsBVC experiment is enabled. + BOOL _needsInitialDisplay; // Records whether a memory warning occurred in the current session. BOOL _receivedMemoryWarningInSession; // |YES| if there is card set animation being processed. For testing only. @@ -858,8 +869,9 @@ // rest of the time refreshing is necessary because the card views may have // been purged and recreated or the orientation might have changed while in // a modal view. - BOOL isInitialDisplay = _initialCardSize.height == 0.0; - if (isInitialDisplay) { + if ([self needsInitialDisplay]) { + _needsInitialDisplay = NO; + // Calls like -viewportSizeWasChanged should instead be called in // viewDidLayoutSubviews, but since stack_view_controller is going away in // the near future, it's easier to put this here instead of refactoring. @@ -867,9 +879,17 @@ [self.view layoutIfNeeded]; } + // If cards haven't been sized yet, size them now. + if (_initialCardSize.height == 0.0) { + DCHECK(!TabSwitcherPresentsBVCEnabled()); + [self setInitialCardSizingForSize:_scrollView.bounds.size]; + } else { + DCHECK(TabSwitcherPresentsBVCEnabled()); + } + [_mainCardSet setObserver:self]; [_otrCardSet setObserver:self]; - [self setInitialCardSizing]; + [self configureCardSets]; [self viewportSizeWasChanged]; } else { [self refreshCardDisplayWithAnimation:NO]; @@ -1067,12 +1087,9 @@ } - (void)prepareForDisplayAtSize:(CGSize)size { - if (!CGSizeEqualToSize(size, self.view.bounds.size) && - !IsSafeAreaCompatibleToolbarEnabled()) { - CGRect newBounds = self.view.bounds; - newBounds.size = size; - self.view.bounds = newBounds; - } + DCHECK(TabSwitcherPresentsBVCEnabled()); + _needsInitialDisplay = YES; + [self setInitialCardSizingForSize:size]; } #pragma mark - @@ -1199,11 +1216,14 @@ [self enableGestureHandlers]; } -- (void)setInitialCardSizing { +- (void)setInitialCardSizingForSize:(CGSize)size { DCHECK(_initialCardSize.height == 0.0); - CGFloat viewportBreadth = [self scrollBreadth:[_scrollView bounds].size]; - _initialCardSize = [self cardSizeForBreadth:viewportBreadth]; + CGFloat viewportBreadth = [self scrollBreadth:size]; + _initialCardSize = + [self cardSizeForBreadth:viewportBreadth scrollViewSize:size]; +} +- (void)configureCardSets { // Configure the stack layout behaviors. This is done only once because the // fan-out, margins, etc. should stay the same even if the cards change size // due to rotation. @@ -1214,6 +1234,14 @@ configureLayoutParametersWithMargin:page_animation_util::kCardMargin]; } +- (BOOL)needsInitialDisplay { + if (TabSwitcherPresentsBVCEnabled()) { + return _needsInitialDisplay; + } else { + return _initialCardSize.height == 0.0; + } +} + - (void)updateDeckOrientationWithAnimation:(BOOL)animates { [self updateDeckAxisPositions]; [self updateCardSizesWithAnimation:animates]; @@ -1446,21 +1474,21 @@ CGFloat availableBreadth = [self scrollBreadth:[_scrollView bounds].size]; if ([self bothDecksShouldBeDisplayed]) availableBreadth *= kActiveDeckDisplayFraction; - CGSize idealCardSize = [self cardSizeForBreadth:availableBreadth]; + CGSize idealCardSize = [self cardSizeForBreadth:availableBreadth + scrollViewSize:[_scrollView bounds].size]; // Crop the ideal size so that it's no bigger than the initial size. return CGSizeMake(std::min(idealCardSize.width, _initialCardSize.width), std::min(idealCardSize.height, _initialCardSize.height)); } -- (CGSize)cardSizeForBreadth:(CGFloat)breadth { +- (CGSize)cardSizeForBreadth:(CGFloat)breadth scrollViewSize:(CGSize)viewSize { BOOL isPortrait = IsPortrait(); CGFloat cardBreadth = breadth - 2 * page_animation_util::kCardMargin; CGFloat contentBreadthInset = isPortrait ? kCardImageInsets.left + kCardImageInsets.right : kCardImageInsets.top + kCardImageInsets.bottom; CGFloat contentBreadth = cardBreadth - contentBreadthInset; - CGSize viewSize = [_scrollView bounds].size; CGFloat aspectRatio = [self scrollLength:viewSize] / [self scrollBreadth:viewSize]; CGFloat contentLength = std::floor(aspectRatio * contentBreadth); @@ -1684,6 +1712,21 @@ self.dummyToolbarBackgroundView = [[UIView alloc] initWithFrame:CGRectZero]; [self.dummyToolbarBackgroundView setClipsToBounds:YES]; + if (TabSwitcherPresentsBVCEnabled()) { + if (!CGSizeEqualToSize(self.view.frame.size, + self.view.superview.bounds.size)) { + // Forcibly mark the view as needing layout if it is a different size from + // its superview. + [self.view setNeedsLayout]; + } + + // Forces a layout because the views may not yet be sized and positioned + // correctly for their initial layout. + [self.view layoutIfNeeded]; + [self refreshCardDisplayWithAnimation:NO]; + [self updateToolbarAppearanceWithAnimation:NO]; + } + // Set the transition completion block. [CATransaction begin]; [CATransaction setCompletionBlock:^{ @@ -3155,10 +3198,18 @@ } - (void)alignDisplayViewsToViewport { - DCHECK(CGSizeEqualToSize([_mainCardSet displayView].frame.size, - [_scrollView frame].size)); - DCHECK(CGSizeEqualToSize([_otrCardSet displayView].frame.size, - [_scrollView frame].size)); + // TODO(crbug.com/789975): The iPhoneX iOS 11.0.0 simulator was a beta release + // and has a bug that causes this DCHECK to fire incorrectly. Disable the + // DCHECK on iPhoneX 11.0.0, until the bots are updated to a newer simulator + // version. + if (!IsIPhoneX() || base::ios::IsRunningOnOrLater(11, 0, 1)) { + DCHECK(CGSizeEqualToSize( + AlignRectOriginAndSizeToPixels([_mainCardSet displayView].frame).size, + [_scrollView frame].size)); + DCHECK(CGSizeEqualToSize( + AlignRectOriginAndSizeToPixels([_otrCardSet displayView].frame).size, + [_scrollView frame].size)); + } CGRect newDisplayViewFrame = CGRectMake( [_scrollView contentOffset].x, [_scrollView contentOffset].y, [_scrollView frame].size.width, [_scrollView frame].size.height);
diff --git a/ios/chrome/browser/ui/stack_view/stack_view_controller_unittest.mm b/ios/chrome/browser/ui/stack_view/stack_view_controller_unittest.mm index a602a6b1..08590b3 100644 --- a/ios/chrome/browser/ui/stack_view/stack_view_controller_unittest.mm +++ b/ios/chrome/browser/ui/stack_view/stack_view_controller_unittest.mm
@@ -6,6 +6,7 @@ #include "base/logging.h" #import "ios/chrome/browser/tabs/tab_model.h" +#include "ios/chrome/browser/ui/main/main_feature_flags.h" #import "ios/chrome/browser/ui/stack_view/card_set.h" #import "ios/chrome/browser/ui/stack_view/stack_card.h" #import "ios/chrome/browser/ui/stack_view/stack_view_controller.h" @@ -121,9 +122,13 @@ activeCardSet:static_cast<CardSet*>(main_card_set_) applicationCommandEndpoint:nil]; // Resize the view and call VC lifecycle events - [view_controller_ view].frame = - CGRectMake(0.0, 0.0, kViewportDimension, kViewportDimension); + CGRect frame = CGRectMake(0.0, 0.0, kViewportDimension, kViewportDimension); + [view_controller_ view].frame = frame; + // Simulate displaying the view. + if (TabSwitcherPresentsBVCEnabled()) { + [view_controller_ prepareForDisplayAtSize:frame.size]; + } [view_controller_ viewWillAppear:NO]; } void TearDown() override {
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc index 21effb9..cb291ff 100644 --- a/net/nqe/network_quality_estimator.cc +++ b/net/nqe/network_quality_estimator.cc
@@ -16,7 +16,6 @@ #include "base/metrics/histogram_base.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" -#include "base/rand_util.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" @@ -124,40 +123,6 @@ return kSuffixes[arraysize(kSuffixes) - 1]; } -// The least significant kTrimBits of the metric will be discarded. If the -// trimmed metric value is greater than what can be fit in kBitsPerMetric bits, -// then the largest value that can be represented in kBitsPerMetric bits is -// returned. -const int32_t kTrimBits = 5; - -// Maximum number of bits in which one metric should fit. Restricting the amount -// of space allocated to a single metric makes it possile to fit multiple -// metrics in a single histogram sample, and ensures that all those metrics -// are recorded together as a single tuple. -const int32_t kBitsPerMetric = 7; - -static_assert(32 >= kBitsPerMetric * 4, - "Four metrics would not fit in a 32-bit int"); - -// Trims the |metric| by removing the last kTrimBits, and then rounding down -// the |metric| such that the |metric| fits in kBitsPerMetric. -int32_t FitInKBitsPerMetricBits(int32_t metric) { - // Remove the last kTrimBits. This will allow the metric to fit within - // kBitsPerMetric while losing only the least significant bits. - DCHECK_LE(0, metric); - metric = metric >> kTrimBits; - - // kLargestValuePossible is the largest value that can be recorded using - // kBitsPerMetric. - static const int32_t kLargestValuePossible = (1 << kBitsPerMetric) - 1; - if (metric > kLargestValuePossible) { - // Fit |metric| in kBitsPerMetric by clamping it down. - metric = kLargestValuePossible; - } - DCHECK_EQ(0, metric >> kBitsPerMetric) << metric; - return metric; -} - void RecordRTTAccuracy(base::StringPiece prefix, int32_t metric, base::TimeDelta measuring_duration, @@ -577,107 +542,6 @@ return; throughput_analyzer_->NotifyRequestCompleted(request); - RecordCorrelationMetric(request, net_error); -} - -void NetworkQualityEstimator::RecordCorrelationMetric(const URLRequest& request, - int net_error) const { - DCHECK(thread_checker_.CalledOnValidThread()); - - // The histogram is recorded randomly to reduce overhead involved with sparse - // histograms. Furthermore, recording the correlation on each request is - // unnecessary. - if (RandDouble() >= params_->correlation_uma_logging_probability()) - return; - - if (request.response_info().was_cached || - !request.response_info().network_accessed) { - return; - } - - LoadTimingInfo load_timing_info; - request.GetLoadTimingInfo(&load_timing_info); - // If the load timing info is unavailable, it probably means that the request - // did not go over the network. - if (load_timing_info.send_start.is_null() || - load_timing_info.receive_headers_end.is_null()) { - return; - } - - // Record UMA only for successful requests that have completed. - if (net_error != OK) - return; - if (!request.response_info().headers.get() || - request.response_info().headers->response_code() != HTTP_OK) { - return; - } - if (load_timing_info.receive_headers_end < last_main_frame_request_) - return; - - // Use the system clock instead of |tick_clock_| to compare the current - // timestamp with the |load_timing_info| timestamp since the latter is set by - // the system clock, and may be different from |tick_clock_| in tests. - const base::TimeTicks now = base::TimeTicks::Now(); - // Record UMA only for requests that started recently. - if (now - last_main_frame_request_ > base::TimeDelta::FromSeconds(15)) - return; - - if (last_connection_change_ >= last_main_frame_request_) - return; - - DCHECK_GE(now, load_timing_info.send_start); - - int32_t rtt = 0; - - if (estimated_quality_at_last_main_frame_.downstream_throughput_kbps() == - nqe::internal::INVALID_RTT_THROUGHPUT) { - return; - } - - if (UseTransportRTT()) { - if (estimated_quality_at_last_main_frame_.transport_rtt() == - nqe::internal::InvalidRTT()) { - return; - } - rtt = FitInKBitsPerMetricBits( - estimated_quality_at_last_main_frame_.transport_rtt().InMilliseconds()); - } else { - if (estimated_quality_at_last_main_frame_.http_rtt() == - nqe::internal::InvalidRTT()) { - return; - } - rtt = FitInKBitsPerMetricBits( - estimated_quality_at_last_main_frame_.http_rtt().InMilliseconds()); - } - - const int32_t downstream_throughput = FitInKBitsPerMetricBits( - estimated_quality_at_last_main_frame_.downstream_throughput_kbps()); - - const int32_t resource_load_time = FitInKBitsPerMetricBits( - (now - load_timing_info.send_start).InMilliseconds()); - - int64_t resource_size = (request.GetTotalReceivedBytes() * 8) / 1024; - if (resource_size >= (1 << kBitsPerMetric)) { - // Too large resource size (at least 128 Kb). - return; - } - - DCHECK_EQ( - 0, (rtt | downstream_throughput | resource_load_time | resource_size) >> - kBitsPerMetric); - - // First 32 - (4* kBitsPerMetric) of the sample are unset. Next - // kBitsPerMetric of the sample contain |rtt|. Next - // kBitsPerMetric contain |downstream_throughput|. Next kBitsPerMetric - // contain |resource_load_time|. And, the last kBitsPerMetric - // contain |resource_size|. - int32_t sample = rtt; - sample = (sample << kBitsPerMetric) | downstream_throughput; - sample = (sample << kBitsPerMetric) | resource_load_time; - sample = (sample << kBitsPerMetric) | resource_size; - - base::UmaHistogramSparse("NQE.Correlation.ResourceLoadTime.0Kb_128Kb", - sample); } void NetworkQualityEstimator::NotifyURLRequestDestroyed( @@ -1717,10 +1581,6 @@ watcher_factory_->SetTickClockForTesting(tick_clock_); } -double NetworkQualityEstimator::RandDouble() const { - return base::RandDouble(); -} - void NetworkQualityEstimator::OnUpdatedTransportRTTAvailable( SocketPerformanceWatcherFactory::Protocol protocol, const base::TimeDelta& rtt,
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h index bf9cb9fd..7311adb 100644 --- a/net/nqe/network_quality_estimator.h +++ b/net/nqe/network_quality_estimator.h
@@ -276,9 +276,6 @@ // Overrides the tick clock used by |this| for testing. void SetTickClockForTesting(base::TickClock* tick_clock); - // Returns a random double in the range [0.0, 1.0). Virtualized for testing. - virtual double RandDouble() const; - // Returns the effective type of the current connection based on only the // observations received after |start_time|. |http_rtt|, |transport_rtt| and // |downstream_throughput_kbps| must be non-null. |http_rtt|, |transport_rtt| @@ -516,11 +513,6 @@ // Returns true if the cached network quality estimate was successfully read. bool ReadCachedNetworkQualityEstimate(); - // Records a correlation metric that can be used for computing the correlation - // between HTTP-layer RTT, transport-layer RTT, throughput and the time - // taken to complete |request|. - void RecordCorrelationMetric(const URLRequest& request, int net_error) const; - // Returns true if transport RTT should be used for computing the effective // connection type. bool UseTransportRTT() const;
diff --git a/net/nqe/network_quality_estimator_params.cc b/net/nqe/network_quality_estimator_params.cc index 51110893..e05c7c8 100644 --- a/net/nqe/network_quality_estimator_params.cc +++ b/net/nqe/network_quality_estimator_params.cc
@@ -403,11 +403,6 @@ params_, "rssi_weight_per_signal_strength_level", 1.0)), - correlation_uma_logging_probability_( - GetDoubleValueForVariationParamWithDefaultValue( - params_, - "correlation_logging_probability", - 0.01)), forced_effective_connection_type_( GetInitForcedEffectiveConnectionType(params_)), forced_effective_connection_type_on_cellular_only_( @@ -480,8 +475,6 @@ "socket_watchers_min_notification_interval_msec", 200))), use_small_responses_(false) { - DCHECK_LE(0.0, correlation_uma_logging_probability_); - DCHECK_GE(1.0, correlation_uma_logging_probability_); DCHECK(lower_bound_http_rtt_transport_rtt_multiplier_ == -1 || lower_bound_http_rtt_transport_rtt_multiplier_ > 0); DCHECK(upper_bound_http_rtt_transport_rtt_multiplier_ == -1 ||
diff --git a/net/nqe/network_quality_estimator_params.h b/net/nqe/network_quality_estimator_params.h index c7ccd623..4011232c 100644 --- a/net/nqe/network_quality_estimator_params.h +++ b/net/nqe/network_quality_estimator_params.h
@@ -88,12 +88,6 @@ return weight_multiplier_per_signal_strength_level_; } - // Returns the fraction of URL requests that should record the correlation - // UMA. - double correlation_uma_logging_probability() const { - return correlation_uma_logging_probability_; - } - // Returns an unset value if the effective connection type has not been forced // via the |params| provided to this class. Otherwise, returns a value set to // the effective connection type that has been forced. Forced ECT can be @@ -269,7 +263,6 @@ const double throughput_hanging_requests_cwnd_size_multiplier_; const double weight_multiplier_per_second_; const double weight_multiplier_per_signal_strength_level_; - const double correlation_uma_logging_probability_; base::Optional<EffectiveConnectionType> forced_effective_connection_type_; const bool forced_effective_connection_type_on_cellular_only_; bool persistent_cache_reading_enabled_;
diff --git a/net/nqe/network_quality_estimator_test_util.cc b/net/nqe/network_quality_estimator_test_util.cc index af618f9b..68ce8c06 100644 --- a/net/nqe/network_quality_estimator_test_util.cc +++ b/net/nqe/network_quality_estimator_test_util.cc
@@ -68,7 +68,6 @@ net_log->bound().net_log()), current_network_type_(NetworkChangeNotifier::CONNECTION_UNKNOWN), accuracy_recording_intervals_set_(false), - rand_double_(0.0), embedded_test_server_(base::FilePath(kTestFilePath)), suppress_notifications_for_testing_(suppress_notifications_for_testing), net_log_(std::move(net_log)) { @@ -92,7 +91,6 @@ net_log->bound().net_log()), current_network_type_(NetworkChangeNotifier::CONNECTION_UNKNOWN), accuracy_recording_intervals_set_(false), - rand_double_(0.0), embedded_test_server_(base::FilePath(kTestFilePath)), suppress_notifications_for_testing_(false), net_log_(std::move(net_log)) { @@ -262,10 +260,6 @@ return NetworkQualityEstimator::GetAccuracyRecordingIntervals(); } -double TestNetworkQualityEstimator::RandDouble() const { - return rand_double_; -} - base::Optional<int32_t> TestNetworkQualityEstimator::GetBandwidthDelayProductKbits() const { if (bandwidth_delay_product_kbits_.has_value())
diff --git a/net/nqe/network_quality_estimator_test_util.h b/net/nqe/network_quality_estimator_test_util.h index 0c60532..07dd7ea0 100644 --- a/net/nqe/network_quality_estimator_test_util.h +++ b/net/nqe/network_quality_estimator_test_util.h
@@ -196,10 +196,6 @@ const std::vector<base::TimeDelta>& GetAccuracyRecordingIntervals() const override; - void set_rand_double(double rand_double) { rand_double_ = rand_double; } - - double RandDouble() const override; - void set_bandwidth_delay_product_kbits(int32_t value) { bandwidth_delay_product_kbits_ = value; } @@ -287,8 +283,6 @@ // If set, GetRTTEstimateInternal() would return the set value. base::Optional<base::TimeDelta> rtt_estimate_internal_; - double rand_double_; - // If set, GetBandwidthDelayProductKbits() would return its set value. // Otherwise, the base implementation is called. base::Optional<int32_t> bandwidth_delay_product_kbits_;
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc index d1c60a2d..445484b 100644 --- a/net/nqe/network_quality_estimator_unittest.cc +++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -2660,196 +2660,6 @@ histogram_tester.ExpectTotalCount("NQE.NetworkIdAvailable", 4); } -// Tests that the correlation histogram is recorded correctly based on -// correlation logging probability set in the variation params. -TEST(NetworkQualityEstimatorTest, CorrelationHistogram) { - // Match the values set in network_quality_estimator.cc. - static const int32_t kTrimBits = 5; - static const int32_t kBitsPerMetric = 7; - - const struct { - bool use_transport_rtt; - double rand_double; - double correlation_logging_probability; - base::TimeDelta transport_rtt; - int32_t expected_transport_rtt_milliseconds; - base::TimeDelta http_rtt; - int32_t expected_http_rtt_milliseconds; - int32_t downstream_throughput_kbps; - int32_t expected_downstream_throughput_kbps; - - } tests[] = { - { - // Verify that the metric is not recorded if the logging probability - // is set to 0.0. - false, 0.5, 0.0, base::TimeDelta::FromSeconds(1), 1000 >> kTrimBits, - base::TimeDelta::FromSeconds(2), 2000 >> kTrimBits, 3000, - 3000 >> kTrimBits, - }, - { - // Verify that the metric is not recorded if the logging probability - // is lower than the value returned by the random number generator. - false, 0.3, 0.1, base::TimeDelta::FromSeconds(1), 1000 >> kTrimBits, - base::TimeDelta::FromSeconds(2), 2000 >> kTrimBits, 3000, - 3000 >> kTrimBits, - }, - { - // Verify that the metric is recorded if the logging probability is - // higher than the value returned by the random number generator. - false, 0.3, 0.4, base::TimeDelta::FromSeconds(1), 1000 >> kTrimBits, - base::TimeDelta::FromSeconds(2), 2000 >> kTrimBits, 3000, - 3000 >> kTrimBits, - }, - { - // Verify that the metric is not recorded if the HTTP RTT is - // unavailable. - false, 0.3, 0.4, base::TimeDelta::FromSeconds(1), 1000 >> kTrimBits, - nqe::internal::InvalidRTT(), 2000 >> kTrimBits, 3000, - 3000 >> kTrimBits, - }, - { - // Verify that the metric is not recorded if the transport RTT is - // unavailable. - true, 0.3, 0.4, nqe::internal::InvalidRTT(), 1000 >> kTrimBits, - base::TimeDelta::FromSeconds(2), 2000 >> kTrimBits, 3000, - 3000 >> kTrimBits, - }, - { - // Verify that the metric is not recorded if the throughput is - // unavailable. - false, 0.3, 0.4, base::TimeDelta::FromSeconds(1), 1000 >> kTrimBits, - base::TimeDelta::FromSeconds(2), 2000 >> kTrimBits, - nqe::internal::INVALID_RTT_THROUGHPUT, 3000 >> kTrimBits, - }, - { - // Verify that the metric is recorded if the logging probability is - // set to 1.0. - false, 0.5, 1.0, base::TimeDelta::FromSeconds(1), 1000 >> kTrimBits, - base::TimeDelta::FromSeconds(2), 2000 >> kTrimBits, 3000, - 3000 >> kTrimBits, - }, - { - // Verify that the metric is recorded if the logging probability is - // set to 1.0. - true, 0.5, 1.0, base::TimeDelta::FromSeconds(1), 1000 >> kTrimBits, - base::TimeDelta::FromSeconds(2), 2000 >> kTrimBits, 3000, - 3000 >> kTrimBits, - }, - { - // Verify that if the metric is larger than - // 2^(kBitsPerMetric + kTrimBits), it is rounded down to - // (2^(kBitsPerMetric + kTrimBits) - 1) >> kTrimBits. - false, 0.5, 1.0, base::TimeDelta::FromSeconds(10), 4095 >> kTrimBits, - base::TimeDelta::FromSeconds(20), 4095 >> kTrimBits, 30000, - 4095 >> kTrimBits, - }, - }; - - for (const auto& test : tests) { - base::HistogramTester histogram_tester; - - std::map<std::string, std::string> variation_params; - variation_params["correlation_logging_probability"] = - base::NumberToString(test.correlation_logging_probability); - if (test.use_transport_rtt) { - variation_params["effective_connection_type_algorithm"] = - "TransportRTTOrDownstreamThroughput"; - } - TestNetworkQualityEstimator estimator(variation_params); - - estimator.set_start_time_null_transport_rtt(test.transport_rtt); - estimator.set_recent_transport_rtt(test.transport_rtt); - estimator.set_start_time_null_http_rtt(test.http_rtt); - estimator.set_recent_http_rtt(test.http_rtt); - estimator.set_start_time_null_downlink_throughput_kbps( - test.downstream_throughput_kbps); - estimator.set_rand_double(test.rand_double); - - TestDelegate test_delegate; - TestURLRequestContext context(true); - context.set_network_quality_estimator(&estimator); - context.Init(); - - histogram_tester.ExpectTotalCount( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb", 0); - - // Start a main-frame request that should cause network quality estimator to - // record the network quality at the last main frame request. - std::unique_ptr<URLRequest> request_1( - context.CreateRequest(estimator.GetEchoURL(), DEFAULT_PRIORITY, - &test_delegate, TRAFFIC_ANNOTATION_FOR_TESTS)); - request_1->SetLoadFlags(request_1->load_flags() | - LOAD_MAIN_FRAME_DEPRECATED); - request_1->Start(); - base::RunLoop().Run(); - - if (test.rand_double >= test.correlation_logging_probability) { - histogram_tester.ExpectTotalCount( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb", 0); - continue; - } - if (!test.use_transport_rtt && - test.http_rtt == nqe::internal::InvalidRTT()) { - histogram_tester.ExpectTotalCount( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb", 0); - continue; - } - if (test.use_transport_rtt && - test.transport_rtt == nqe::internal::InvalidRTT()) { - histogram_tester.ExpectTotalCount( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb", 0); - continue; - } - if (test.downstream_throughput_kbps == - nqe::internal::INVALID_RTT_THROUGHPUT) { - histogram_tester.ExpectTotalCount( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb", 0); - continue; - } - - histogram_tester.ExpectTotalCount( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb", 1); - std::vector<base::Bucket> buckets = histogram_tester.GetAllSamples( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb"); - // Get the bits at index 0-10 which contain the RTT. - // 128 is 2^kBitsPerMetric. - if (test.use_transport_rtt) { - EXPECT_EQ(test.expected_transport_rtt_milliseconds, - buckets.at(0).min >> kBitsPerMetric >> kBitsPerMetric >> - kBitsPerMetric); - } else { - EXPECT_EQ(test.expected_http_rtt_milliseconds, - buckets.at(0).min >> kBitsPerMetric >> kBitsPerMetric >> - kBitsPerMetric); - } - - // Get the bits at index 11-17 which contain the downstream throughput. - EXPECT_EQ(test.expected_downstream_throughput_kbps, - (buckets.at(0).min >> kBitsPerMetric >> kBitsPerMetric) % 128); - - // Get the bits at index 18-24 which contain the resource fetch time. - EXPECT_LE(0, (buckets.at(0).min >> kBitsPerMetric) % 128); - - // Get the bits at index 25-31 which contain the resource load size. - EXPECT_LE(0, (buckets.at(0).min) % 128); - - // Start another main-frame request which is redirected to an HTTPS URL. - // Redirection should not cause any crashes. - std::unique_ptr<URLRequest> request_3( - context.CreateRequest(estimator.GetRedirectURL(), DEFAULT_PRIORITY, - &test_delegate, TRAFFIC_ANNOTATION_FOR_TESTS)); - request_3->Start(); - base::RunLoop().Run(); - EXPECT_FALSE(request_3->original_url().SchemeIsCryptographic()); - EXPECT_TRUE(request_3->url().SchemeIsCryptographic()); - EXPECT_TRUE(!request_3->response_info().headers.get() || - request_3->response_info().headers->response_code() != HTTP_OK); - // Correlation metric should not be logged for redirected requests. - histogram_tester.ExpectTotalCount( - "NQE.Correlation.ResourceLoadTime.0Kb_128Kb", 1); - } -} - class TestNetworkQualitiesCacheObserver : public nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver { public:
diff --git a/services/identity/BUILD.gn b/services/identity/BUILD.gn index 49fb135..52a4c1f 100644 --- a/services/identity/BUILD.gn +++ b/services/identity/BUILD.gn
@@ -51,6 +51,7 @@ sources = [ "identity_manager_impl_unittest.cc", "public/cpp/identity_manager_unittest.cc", + "public/cpp/primary_account_access_token_fetcher_unittest.cc", ] }
diff --git a/services/identity/public/cpp/BUILD.gn b/services/identity/public/cpp/BUILD.gn index 7785800..f2b6694 100644 --- a/services/identity/public/cpp/BUILD.gn +++ b/services/identity/public/cpp/BUILD.gn
@@ -6,6 +6,8 @@ sources = [ "identity_manager.cc", "identity_manager.h", + "primary_account_access_token_fetcher.cc", + "primary_account_access_token_fetcher.h", ] public_deps = [
diff --git a/services/identity/public/cpp/DEPS b/services/identity/public/cpp/DEPS index 8c6f855..b596ac3ee 100644 --- a/services/identity/public/cpp/DEPS +++ b/services/identity/public/cpp/DEPS
@@ -1,5 +1,7 @@ include_rules = [ + "+components/prefs/testing_pref_service.h", "+components/signin/core/browser/account_info.h", "+components/signin/core/browser/profile_management_switches.h", "+google_apis/gaia/google_service_auth_error.h", + "+google_apis/gaia/oauth2_token_service.h", ]
diff --git a/services/identity/public/cpp/README.md b/services/identity/public/cpp/README.md index c9e05fa2..f00707e 100644 --- a/services/identity/public/cpp/README.md +++ b/services/identity/public/cpp/README.md
@@ -5,16 +5,20 @@ - Synchronous access to the information of the primary account (via caching) +PrimaryAccountTokenFetcher is the primary client-side interface for obtaining +access tokens for the primary account. In particular, it takes care of waiting +until the primary account is available. + IMPLEMENTATION NOTES -The IdentityManager is being developed in parallel with the implementation and -interfaces of the Identity Service itself. The motivation is to allow clients to -be converted to use the IdentityManager in a parallel and pipelined fashion with -building out the Identity Service as the backing implementation of the -IdentityManager. +The Identity Service client library is being developed in parallel with the +implementation and interfaces of the Identity Service itself. The motivation is +to allow clients to be converted to use this client library in a parallel and +pipelined fashion with building out the Identity Service as the backing +implementation of the library. -In the near term, IdentityManager is backed directly by //components/signin -classes. We are striving to make its interactions with those classes as similar -as possible to its eventual interaction with the Identity Service. In places -where those interactions vary significantly from the envisioned eventual -interaction with the Identity Service, we have placed TODOs. +In the near term, this library is backed directly by //components/signin +classes. We are striving to make the interactions of this library with those +classes as similar as possible to its eventual interaction with the Identity +Service. In places where those interactions vary significantly from the +envisioned eventual interaction with the Identity Service, we have placed TODOs.
diff --git a/components/signin/core/browser/primary_account_access_token_fetcher.cc b/services/identity/public/cpp/primary_account_access_token_fetcher.cc similarity index 98% rename from components/signin/core/browser/primary_account_access_token_fetcher.cc rename to services/identity/public/cpp/primary_account_access_token_fetcher.cc index f9f600f8..31763c7 100644 --- a/components/signin/core/browser/primary_account_access_token_fetcher.cc +++ b/services/identity/public/cpp/primary_account_access_token_fetcher.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/signin/core/browser/primary_account_access_token_fetcher.h" +#include "services/identity/public/cpp/primary_account_access_token_fetcher.h" #include <utility>
diff --git a/components/signin/core/browser/primary_account_access_token_fetcher.h b/services/identity/public/cpp/primary_account_access_token_fetcher.h similarity index 93% rename from components/signin/core/browser/primary_account_access_token_fetcher.h rename to services/identity/public/cpp/primary_account_access_token_fetcher.h index 8f546378..ed91da98 100644 --- a/components/signin/core/browser/primary_account_access_token_fetcher.h +++ b/services/identity/public/cpp/primary_account_access_token_fetcher.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_SIGNIN_CORE_BROWSER_PRIMARY_ACCOUNT_ACCESS_TOKEN_FETCHER_H_ -#define COMPONENTS_SIGNIN_CORE_BROWSER_PRIMARY_ACCOUNT_ACCESS_TOKEN_FETCHER_H_ +#ifndef SERVICES_IDENTITY_PUBLIC_CPP_PRIMARY_ACCOUNT_ACCESS_TOKEN_FETCHER_H_ +#define SERVICES_IDENTITY_PUBLIC_CPP_PRIMARY_ACCOUNT_ACCESS_TOKEN_FETCHER_H_ #include <memory> #include <string> @@ -82,4 +82,4 @@ DISALLOW_COPY_AND_ASSIGN(PrimaryAccountAccessTokenFetcher); }; -#endif // COMPONENTS_SIGNIN_CORE_BROWSER_PRIMARY_ACCOUNT_ACCESS_TOKEN_FETCHER_H_ +#endif // SERVICES_IDENTITY_PUBLIC_CPP_PRIMARY_ACCOUNT_ACCESS_TOKEN_FETCHER_H_
diff --git a/components/signin/core/browser/primary_account_access_token_fetcher_unittest.cc b/services/identity/public/cpp/primary_account_access_token_fetcher_unittest.cc similarity index 98% rename from components/signin/core/browser/primary_account_access_token_fetcher_unittest.cc rename to services/identity/public/cpp/primary_account_access_token_fetcher_unittest.cc index 8537b87..cc90529 100644 --- a/components/signin/core/browser/primary_account_access_token_fetcher_unittest.cc +++ b/services/identity/public/cpp/primary_account_access_token_fetcher_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/signin/core/browser/primary_account_access_token_fetcher.h" +#include "services/identity/public/cpp/primary_account_access_token_fetcher.h" #include <memory> #include <utility>
diff --git a/services/ui/public/cpp/gpu/context_provider_command_buffer.cc b/services/ui/public/cpp/gpu/context_provider_command_buffer.cc index fc2e105..7bb5ba6d 100644 --- a/services/ui/public/cpp/gpu/context_provider_command_buffer.cc +++ b/services/ui/public/cpp/gpu/context_provider_command_buffer.cc
@@ -202,6 +202,14 @@ return GL_RGB; } +void ContextProviderCommandBuffer::AddRef() const { + base::RefCountedThreadSafe<ContextProviderCommandBuffer>::AddRef(); +} + +void ContextProviderCommandBuffer::Release() const { + base::RefCountedThreadSafe<ContextProviderCommandBuffer>::Release(); +} + gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { // This is called on the thread the context will be used. DCHECK(context_thread_checker_.CalledOnValidThread()); @@ -371,7 +379,7 @@ return gles2_impl_.get(); } -gpu::raster::RasterInterface* ContextProviderCommandBuffer::RasterContext() { +gpu::raster::RasterInterface* ContextProviderCommandBuffer::RasterInterface() { DCHECK(bind_tried_); DCHECK_EQ(bind_result_, gpu::ContextResult::kSuccess); CheckValidThreadOrLockAcquired(); @@ -380,7 +388,7 @@ return raster_impl_.get(); if (!attributes_.enable_raster_interface) { - DLOG(ERROR) << "Unexpected access to RasterContext()"; + DLOG(ERROR) << "Unexpected access to RasterInterface()"; return nullptr; }
diff --git a/services/ui/public/cpp/gpu/context_provider_command_buffer.h b/services/ui/public/cpp/gpu/context_provider_command_buffer.h index 3fa465f..132803e 100644 --- a/services/ui/public/cpp/gpu/context_provider_command_buffer.h +++ b/services/ui/public/cpp/gpu/context_provider_command_buffer.h
@@ -17,6 +17,7 @@ #include "base/threading/thread_checker.h" #include "base/trace_event/memory_dump_provider.h" #include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "gpu/command_buffer/client/shared_memory_limits.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/command_buffer/common/scheduling_priority.h" @@ -47,10 +48,12 @@ namespace ui { -// Implementation of viz::ContextProvider that provides a GL implementation over -// command buffer to the GPU process. +// Implementation of viz::ContextProvider that provides a GL implementation +// over command buffer to the GPU process. class ContextProviderCommandBuffer - : public viz::ContextProvider, + : public base::RefCountedThreadSafe<ContextProviderCommandBuffer>, + public viz::ContextProvider, + public viz::RasterContextProvider, public base::trace_event::MemoryDumpProvider { public: ContextProviderCommandBuffer( @@ -72,10 +75,12 @@ // on the default framebuffer. uint32_t GetCopyTextureInternalFormat(); - // viz::ContextProvider implementation. + // viz::ContextProvider / viz::RasterContextProvider implementation. + void AddRef() const override; + void Release() const override; gpu::ContextResult BindToCurrentThread() override; gpu::gles2::GLES2Interface* ContextGL() override; - gpu::raster::RasterInterface* RasterContext() override; + gpu::raster::RasterInterface* RasterInterface() override; gpu::ContextSupport* ContextSupport() override; class GrContext* GrContext() override; viz::ContextCacheController* CacheController() override; @@ -97,6 +102,7 @@ scoped_refptr<base::SingleThreadTaskRunner> default_task_runner); protected: + friend class base::RefCountedThreadSafe<ContextProviderCommandBuffer>; ~ContextProviderCommandBuffer() override; void OnLostContext();
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index 010152d9..dfeaea0 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h
@@ -228,8 +228,12 @@ #define SK_SUPPORT_LEGACY_TILED_BITMAPS #endif -#ifndef SK_COLOR_SPACE_XFORM_LEGACY_PIPELINE -#define SK_COLOR_SPACE_XFORM_LEGACY_PIPELINE +#ifndef SK_SUPPORT_LEGACY_ADOBE_XYZ +#define SK_SUPPORT_LEGACY_ADOBE_XYZ +#endif + +#ifndef SK_LEGACY_HIGH_QUALITY_SCALING_CLAMP +#define SK_LEGACY_HIGH_QUALITY_SCALING_CLAMP #endif // remove after rebaselining svg layout tests @@ -237,11 +241,6 @@ #define SK_SUPPORT_LEGACY_SVG_ARC_TO #endif -// remove after rebaselining exotic color space layout tests -#ifndef SK_SUPPORT_LEGACY_ICC_PRECISON -#define SK_SUPPORT_LEGACY_ICC_PRECISON -#endif - ///////////////////////// Imported from BUILD.gn and skia_common.gypi /* In some places Skia can use static initializers for global initialization,
diff --git a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter index 7f6f37fe..412062b4 100644 --- a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter +++ b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
@@ -56,6 +56,8 @@ -DiceMigrationBrowserTest.Signout -DicePrepareMigrationBrowserTest.Signin -DicePrepareMigrationBrowserTest.Signout +-DicePrepareMigrationChromeSynEndpointBrowserTest.EnableSyncAfterToken +-DicePrepareMigrationChromeSynEndpointBrowserTest.EnableSyncBeforeToken -DisabledSignInIsolationBrowserTest.SyntheticTrial # DnsProbeBrowserTests that are flaky. -DnsProbeBrowserTest.CorrectionsLoadStopped @@ -151,6 +153,28 @@ -SafeBrowsingServiceTest.Prefetch -SafeBrowsingTriggeredPopupBlockerBrowserTest.NoFeature_AllowCreatingNewWindows -SafeBrowsingTriggeredPopupBlockerBrowserTest.NoFeature_NoMessages +-SaveCardBubbleViewsFullFormBrowserTest.Local_ClickingLearnMoreClosesBubble +-SaveCardBubbleViewsFullFormBrowserTest.Local_ClickingNoThanksClosesBubbleIfSecondaryUiMdExpOff +-SaveCardBubbleViewsFullFormBrowserTest.Local_ClickingSaveClosesBubble +-SaveCardBubbleViewsFullFormBrowserTest.Local_ShouldNotHaveNoThanksButtonIfSecondaryUiMdExpOn +-SaveCardBubbleViewsFullFormBrowserTest.Local_SubmittingFormShowsBubbleIfGetUploadDetailsRpcFails +-SaveCardBubbleViewsFullFormBrowserTest.Logic_ShouldAttemptToOfferToSaveIfEverythingFound +-SaveCardBubbleViewsFullFormBrowserTest.Logic_ShouldNotOfferToSaveIfAddressNotFound +-SaveCardBubbleViewsFullFormBrowserTest.Logic_ShouldNotOfferToSaveIfCvcNotFoundAndCvcExpOff +-SaveCardBubbleViewsFullFormBrowserTest.Logic_ShouldNotOfferToSaveIfInvalidCvcFoundAndCvcExpOff +-SaveCardBubbleViewsFullFormBrowserTest.Logic_ShouldNotOfferToSaveIfNameNotFound +-SaveCardBubbleViewsFullFormBrowserTest.Upload_ClickingNoThanksClosesBubbleIfSecondaryUiMdExpOff +-SaveCardBubbleViewsFullFormBrowserTest.Upload_ClickingSaveClosesBubble +-SaveCardBubbleViewsFullFormBrowserTest.Upload_ConfirmButtonIsDisabledIfInvalidCvcAndCvcExpOn +-SaveCardBubbleViewsFullFormBrowserTest.Upload_ConfirmButtonIsDisabledIfNoCvcAndCvcExpOn +-SaveCardBubbleViewsFullFormBrowserTest.Upload_Entering3DigitCvcAndClickingConfirmClosesBubbleIfNoCvcAndCvcExpOn +-SaveCardBubbleViewsFullFormBrowserTest.Upload_Entering4DigitCvcAndClickingConfirmClosesBubbleIfNoCvcAndCvcExpOn +-SaveCardBubbleViewsFullFormBrowserTest.Upload_ShouldNotHaveLearnMoreLinkIfNewUiExperimentOn +-SaveCardBubbleViewsFullFormBrowserTest.Upload_ShouldNotHaveNoThanksButtonIfSecondaryUiMdExpOn +-SaveCardBubbleViewsFullFormBrowserTest.Upload_SubmittingFormWithInvalidCvcShowsBubbleIfCvcExpOn +-SaveCardBubbleViewsFullFormWithShippingBrowserTest.Logic_ShouldAttemptToOfferToSaveIfStreetAddressesConflict +-SaveCardBubbleViewsFullFormWithShippingBrowserTest.Logic_ShouldNotOfferToSaveIfNamesConflict +-SaveCardBubbleViewsFullFormWithShippingBrowserTest.Logic_ShouldNotOfferToSaveIfPostalCodesConflict -SecurityStateTabHelperTest.BrokenHTTPS -SecurityStateTabHelperTest.MixedContentWithSHA1Cert -SecurityStateTabHelperTest.PasswordSecurityLevelDowngradedOnFilesystemUrl
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/12-55-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/12-55-expected.png index 36618e9..c55b147 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/12-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/12-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/182-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/182-expected.png index 87fc45e7..ff52a72d4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/182-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/182-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/2-dht-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/2-dht-expected.png index db69097b..6016223 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/2-dht-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/2-dht-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/23-55-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/23-55-expected.png index 0bba402..67cb749 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/23-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/23-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/55-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/55-expected.png index d39ec76e..c6db2fe 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/alt-text-wrapping-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/alt-text-wrapping-expected.png index 411b6a5..5bff80da 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/alt-text-wrapping-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/alt-text-wrapping-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png index 27cee2f756..e55e9a7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-shape-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-shape-expected.png index fe02a6b1..2d7fb3e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-shape-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-image-shape-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png index 7b0c89b..d88c9d2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png index 4669db6c..c0621c2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png index 605a7ef..3808899 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png index d53d4c6b..91776e00 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png index 7f1965e..f89f2e3 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-css-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-css-expected.png index 17b41b6..b0f98fbb 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-css-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-css-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-expected.png index e74ca10..ca7ed4930 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png index 84a95e1..5caba57 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/favicon-as-image-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/favicon-as-image-expected.png index ca13756..3d36747 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/favicon-as-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/favicon-as-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/image-map-anchor-children-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/image-map-anchor-children-expected.png index 0232d9ef..173f84a5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/image-map-anchor-children-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/image-map-anchor-children-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png index 94279e8..e89b9a27b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png index 804ea1b..e17091e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png index 9271b93..067f704 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-in-positioned-container-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png index d392de6a..113cea58 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png index 579e241..fdcbfad9 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png index 1618d43..a49ed399 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png index f92650c..00af91d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-paint-root-offset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png index f780c29..cf8273d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-with-scale-transform-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png index a199de2..0aa30d7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png index 53a609a0..3f04b5a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-focus-ring-zoom-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png index cf6ce28..a722889 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png index 2f3eff0..712af0f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png index a30781b..430188f5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/imagemap-polygon-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png index 5b9db4ac9..9fe685c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png index 9322a516..0be36c69 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/pixel-crack-image-background-webkit-transform-scale-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/pixel-crack-image-background-webkit-transform-scale-expected.png index d658adc1..37ee86f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/pixel-crack-image-background-webkit-transform-scale-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/pixel-crack-image-background-webkit-transform-scale-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/png-with-color-profile-expected.png index 5b9db4ac9..9fe685c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/png-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/png-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png index d6f29e0..0111d223 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png index 11b14515..874ef6a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png index 16d4e1b..2d74891 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png index a426672..7cb4bc0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png index 159f9c1..52de00c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png index d2e53c8..dab7c4b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-empty-alt-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-empty-alt-expected.png index 7492294..aacb42a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-empty-alt-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-empty-alt-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-expected.png index 1b6626cf..45457cf 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/exotic-color-space/images/rendering-broken-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/12-55-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/12-55-expected.png index 62f6d0d..28f50cd0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/12-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/12-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/182-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/182-expected.png index 1ee6490..778d6e47 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/182-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/182-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/2-dht-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/2-dht-expected.png index 2e61ad8d5..cbe4ccc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/2-dht-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/2-dht-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/23-55-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/23-55-expected.png index cd94916a7..1d062a1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/23-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/23-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/55-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/55-expected.png index a83f1cd3..b72a10f5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png index fe630a2..45860fd2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png index 5bcc4422..b40aea6f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png index 05ebe12..1c785bd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png index f20ed46f..e00db5a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/12-55-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/12-55-expected.png index 7a7f576..591353d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/12-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/12-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/182-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/182-expected.png index f141f09a..c401715 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/182-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/182-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/2-dht-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/2-dht-expected.png index e12012e..8c665b5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/2-dht-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/2-dht-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/23-55-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/23-55-expected.png index f8599594..63a6c77 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/23-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/23-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/55-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/55-expected.png index 075f1ac..15cc6a27 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/exotic-color-space/images/55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/12-55-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/12-55-expected.png index e25ebe7..b97be9a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/12-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/12-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/182-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/182-expected.png index ebfc9560..9151d5cf 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/182-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/182-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-comp-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-comp-expected.png index 02dde9f..a9fd056 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-comp-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-comp-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-dht-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-dht-expected.png index d45dc72..0e84053 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-dht-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/2-dht-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/23-55-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/23-55-expected.png index 0d2cf65..42a15c7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/23-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/23-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/55-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/55-expected.png index 90c4e5c..8052391 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cHRM_color_spin-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cHRM_color_spin-expected.png new file mode 100644 index 0000000..ee9fc669 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cHRM_color_spin-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png new file mode 100644 index 0000000..7c21747 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-animate-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-animate-expected.png new file mode 100644 index 0000000..0997ad0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-animate-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png new file mode 100644 index 0000000..93f8770 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png index 8ec4a0d..64946df 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png new file mode 100644 index 0000000..c51269f --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png index eb030724..2f53777e3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png index eb030724..2f53777e3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png new file mode 100644 index 0000000..138fb41 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png index 7b65507..d99d4a1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-fade-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-fade-expected.png new file mode 100644 index 0000000..406b718 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-fade-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-expected.png index e27948c..ca30f5d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png index 4f80329..656f25aa 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-radius-expected.png index 15e32f14..932bd71 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-radius-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-border-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-clip-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-clip-expected.png new file mode 100644 index 0000000..680b124 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-clip-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-filter-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-filter-expected.png index 676cc3b..5a70f85 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-group-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-group-expected.png index 768286f..e225a5f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-group-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-group-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-iframe-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-iframe-expected.png new file mode 100644 index 0000000..4f70dc0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-iframe-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png index 03a3ff4..ef1be3c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png index c6d9e832..c6a4f79 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png index 7c31ef7d..7267722 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-expected.png index 62d36d2..4bed735 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png index 4c3436c..0279054 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png new file mode 100644 index 0000000..df3e270ca --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png index 356bfef07a..9003dca 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png new file mode 100644 index 0000000..0a170e9 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-shape-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-shape-expected.png index c993e9e..4680b08 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-shape-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-shape-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png new file mode 100644 index 0000000..3cbd3d7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-expected.png index fcc9a458..2f510006 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png index 16d2f691..b48bc5a6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png index b6545e91..7449e80 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png index f5d1dc4..eecdc6c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png index 1b4b7d7f..1133257 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-object-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-object-expected.png new file mode 100644 index 0000000..5c3be24 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-object-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-expected.png index 9ee60756..36269ac3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png index 8cde405..9acc6c6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png new file mode 100644 index 0000000..cbce017 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-background-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-background-size-expected.png index 73cbaf7a..900c4f1b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-background-size-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-background-size-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png index 8acf547..5e39cd2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png index bb5335b4..3d332f5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-svg-size-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/embed-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/embed-image-expected.png new file mode 100644 index 0000000..557fbb3 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/embed-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-css-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-css-expected.png index 041aa05..7697c5a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-css-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-css-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-expected.png index bdbd93b..4662b0e3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png index 6366d72..acd6518 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png index 2fe6f54d..8755b31 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png new file mode 100644 index 0000000..da8ac52 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png new file mode 100644 index 0000000..2e5e3e9b --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/icon-0colors-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/icon-0colors-expected.png similarity index 93% rename from third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/icon-0colors-expected.png rename to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/icon-0colors-expected.png index e51659c..8d419059 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/icon-0colors-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/icon-0colors-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/icon-decoding-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/icon-decoding-expected.png index 07ff309..52febaa 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/icon-decoding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/icon-decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/image-map-anchor-children-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/image-map-anchor-children-expected.png index 6b02e0eb..b34c61e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/image-map-anchor-children-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/image-map-anchor-children-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png index 5a91180e..0071cba 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png index 4baca3b7..d0b7a86 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png index 695c6d6..f8c7ce0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png new file mode 100644 index 0000000..886d262 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png index d717325..1d27571 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png index 5f3feea..d4419933 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/object-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/object-image-expected.png new file mode 100644 index 0000000..557fbb3 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/object-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/optimize-contrast-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/optimize-contrast-canvas-expected.png new file mode 100644 index 0000000..85002138 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/optimize-contrast-canvas-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/optimize-contrast-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/optimize-contrast-image-expected.png new file mode 100644 index 0000000..31a5791 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/optimize-contrast-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/paint-subrect-grid-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/paint-subrect-grid-expected.png new file mode 100644 index 0000000..d2bfca2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/paint-subrect-grid-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png new file mode 100644 index 0000000..0ef5ffa --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-background-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pdf-as-background-expected.png similarity index 91% rename from third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-background-expected.png rename to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pdf-as-background-expected.png index 7abc7f6..fa76288 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-background-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pdf-as-background-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-background-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png similarity index 91% copy from third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-background-expected.png copy to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png index 7abc7f6..fa76288 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-background-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-background-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-background-image-expected.png similarity index 95% rename from third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-background-image-expected.png rename to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-background-image-expected.png index 20448ec..e935025 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-background-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-background-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-image-expected.png similarity index 92% rename from third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png rename to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-image-expected.png index 2764b3a9..96a38aca 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-svg-image-expected.png similarity index 92% copy from third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png copy to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-svg-image-expected.png index 2764b3a9..96a38aca 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/pixelated-svg-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-suite/test-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-suite/test-expected.png index 944f93e0b..d9bbf08 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-suite/test-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-suite/test-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-with-color-profile-expected.png index 4baca3b7..d0b7a86 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png similarity index 75% copy from third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png copy to third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png index 2764b3a9..7000d79 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png index f8eb0237..a73dfa00 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png index 2a330d9..55ccac0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png new file mode 100644 index 0000000..4768b44b --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png new file mode 100644 index 0000000..8def3fc1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png new file mode 100644 index 0000000..e80354db --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png index 5609d55..39fad3f0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/12-55-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/12-55-expected.png index a751666..85d800d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/12-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/12-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/182-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/182-expected.png index d644664..dcd5193 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/182-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/182-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-comp-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-comp-expected.png index 1b03bb5..f91ad61 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-comp-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-comp-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-dht-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-dht-expected.png index a9160c0..355a5ef 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-dht-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/2-dht-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/23-55-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/23-55-expected.png index a7471cc..1c51798 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/23-55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/23-55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/55-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/55-expected.png index ce26e4a..1a56e13 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/55-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/55-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/alt-text-wrapping-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/alt-text-wrapping-expected.png index 4a021c4..d686f21c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/alt-text-wrapping-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/alt-text-wrapping-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cHRM_color_spin-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cHRM_color_spin-expected.png index 797e409..416770e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cHRM_color_spin-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cHRM_color_spin-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png index 5f94793..76dd84ef 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-expected.png index 6b4dc8e..7d2e8af 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png index 109f5e7b..057793d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png index 27d2ee77..a510c6a 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-clip-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png index ba9d28d..015e41ad 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png index adc97e8..cccbc596 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png index adc97e8..cccbc596 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png index c4c37ec0..a0985bef 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png index a8f389c6..dcb0a110 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-space-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-expected.png index 30cbdba88..b6f705a 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png index 37f8cbc..e5e9afe 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-image-source-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-radius-expected.png index 2264419..cf258b72 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-radius-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-border-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-clip-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-clip-expected.png index 0e2e252..4b95886 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-clip-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-clip-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-filter-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-filter-expected.png index 64dc9bd..ce23e460 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-filter-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-group-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-group-expected.png index ff3b4c4..cd7cca8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-group-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-group-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-iframe-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-iframe-expected.png index 011349e8..ef00d05 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-iframe-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-iframe-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png index e633715..8016bb9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png index 3446a3f7..e180704 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-pattern-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png index 4a237479..31d2985 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-canvas-svg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-expected.png index 87099a8..0f4d904 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png index aa26b47c..ccbea36b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-filter-all-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png index 9a07333..8de832b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png index 7805462..ba531d4f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-profile-match-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png index faee969..8dafd58b2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-shape-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-shape-expected.png index 8d97d28..03d92b9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-shape-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-shape-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png index 4a470c8..39160b0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-expected.png index a3f242f7..d1e16882 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png new file mode 100644 index 0000000..f0a9aca --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png index bf76203..63e8efb 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-mask-image-svg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png index 4f89e3e..e7e62743 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-adobe-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png index 1b19fb1..4f2d82d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-munsell-srgb-to-srgb-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-object-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-object-expected.png index 737bf590..e1306dbe 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-object-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-object-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-expected.png index 0956d65..87da79b9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png index 6a319b8..d23c017 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-fill-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png index 5df993a6..57e0e8e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-background-size-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-background-size-expected.png index 2699d76..4938ff85 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-background-size-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-background-size-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png index c16a681..810abe1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-svg-size-diff-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-css-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-css-expected.png index 9286599b..968dab9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-css-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-css-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-expected.png index 0a70eee6..a716f1a 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png index 1c3d70e2..d21db25 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-height-image-document-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png index d286084..029a204b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/exif-orientation-image-document-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png new file mode 100644 index 0000000..91aa9b1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png new file mode 100644 index 0000000..5e295e4 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-0colors-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-0colors-expected.png index 1faa51da..45715fa 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-0colors-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-0colors-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-decoding-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-decoding-expected.png index 834c1b4..f0a0074 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-decoding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/icon-decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-in-map-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-in-map-expected.png index 232ead7..bff28676 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-in-map-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-in-map-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-map-anchor-children-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-map-anchor-children-expected.png index ef06010..450008d15 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-map-anchor-children-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/image-map-anchor-children-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png index 3c82ff5a..5506982 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-circle-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png index e400cca8..ea2ebfa6 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-focus-ring-zero-outline-width-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png index 9017c9de..2858fa6 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-circle-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png index 00d1233b..0bc2444 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/imagemap-overflowing-polygon-focus-ring-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png index 7507632..05fd5a3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png index 2e4341ec..ae99322 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-image-decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png index 4a6294a7..0faf7b1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png index 3674985..bd7d9db 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/jpeg-yuv-progressive-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png index 0befc381..20852fea 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/motion-jpeg-single-frame-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/optimize-contrast-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/optimize-contrast-image-expected.png index 2fde685..1ea2d6c9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/optimize-contrast-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/optimize-contrast-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/paint-subrect-grid-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/paint-subrect-grid-expected.png new file mode 100644 index 0000000..2155e9b --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/paint-subrect-grid-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png index d67aff98..466af017 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-background-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-background-expected.png index ae27879..4a6a485 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-background-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-background-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png index ae27879..4a6a485 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-background-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-background-image-expected.png index ad6899ea..453b2e7 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-background-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-background-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-image-expected.png index d58bce6..fefe80ea 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-svg-image-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-svg-image-expected.png index d58bce6..fefe80ea 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-svg-image-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/pixelated-svg-image-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-suite/test-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-suite/test-expected.png index 94781ea..72214f2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-suite/test-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-suite/test-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-with-color-profile-expected.png index 7507632..05fd5a3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-with-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png-with-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png index c8cbd18..161c6fb 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png index 2be8322e..6cd45c3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png index 61c28a20..1047783 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-0px-images-quirk-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png index 4e2deab8..d45d5aa9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-10px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png index 665010b..e68fd7456 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-16px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png index a953a21..bec7be2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-1px-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png index b05a92e3..efca1b6 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-block-flow-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-images-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-images-expected.png index 73e7af0..f0b4716d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-images-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rendering-broken-images-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png index 1a5c8d47..3e222979 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-jpeg-with-adobe-marker-only-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png index 9f34fa8..d0cb225b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/rgb-png-with-cmyk-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png index e41e271..a469759b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png index 091952e..e72e869 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png index bf553bb..a3e4277 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png index 82a33b8..e4524ab 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/ycbcr-with-cmyk-color-profile-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cHRM_color_spin-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cHRM_color_spin-expected.png deleted file mode 100644 index 4c304cbc..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cHRM_color_spin-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png deleted file mode 100644 index c10cd0b..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-jpeg-with-color-profile-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-animate-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-animate-expected.png deleted file mode 100644 index 874c69a..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-animate-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png deleted file mode 100644 index 9623b7a..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-animate-rotate-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png deleted file mode 100644 index dc931ce..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png deleted file mode 100644 index 6de6b5545..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-background-image-repeat-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-border-fade-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-border-fade-expected.png deleted file mode 100644 index 2202536..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-border-fade-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-clip-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-clip-expected.png deleted file mode 100644 index b208b128..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-iframe-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-iframe-expected.png deleted file mode 100644 index 3814e41..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-iframe-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png deleted file mode 100644 index 56bf0512..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-object-fit-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png deleted file mode 100644 index a931591..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-pseudo-content-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png deleted file mode 100644 index 28870ea..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-image-svg-resource-url-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png deleted file mode 100644 index aa96479..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-object-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-object-expected.png deleted file mode 100644 index 3c32c5a..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-object-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png deleted file mode 100644 index 1d78a19..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/color-profile-svg-foreign-object-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png index 95a57e8..4170024 100644 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png +++ b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/cross-fade-invalidation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png deleted file mode 100644 index 5561393..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/gray-scale-jpeg-with-color-profile-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png deleted file mode 100644 index 482ea33d..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/gray-scale-png-with-color-profile-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png deleted file mode 100644 index 5eaf3fc..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/jpeg-yuv-progressive-canvas-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/optimize-contrast-canvas-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/optimize-contrast-canvas-expected.png deleted file mode 100644 index e934c35..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/optimize-contrast-canvas-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/optimize-contrast-image-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/optimize-contrast-image-expected.png deleted file mode 100644 index c183378..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/optimize-contrast-image-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/paint-subrect-grid-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/paint-subrect-grid-expected.png deleted file mode 100644 index d0d4cc28..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/paint-subrect-grid-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png deleted file mode 100644 index 3789e07..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/paletted-png-with-color-profile-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png deleted file mode 100644 index 7abc7f6..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pdf-as-tiled-background-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-svg-image-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-svg-image-expected.png deleted file mode 100644 index 2764b3a9..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/pixelated-svg-image-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png deleted file mode 100644 index 2a18e29..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/png_per_row_alpha_decoding-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png deleted file mode 100644 index 032e35e..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossless-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png deleted file mode 100644 index cf8d19f..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossy-alpha-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png b/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png deleted file mode 100644 index ccbd467..0000000 --- a/third_party/WebKit/LayoutTests/virtual/exotic-color-space/images/webp-color-profile-lossy-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h index ac07eb8f..ab3537f6 100644 --- a/third_party/WebKit/Source/platform/graphics/Image.h +++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -218,9 +218,9 @@ virtual bool ApplyShader(PaintFlags&, const SkMatrix& local_matrix); - // Use ContextProvider() for immediate use only, use ContextProviderWrapper() - // to obtain a retainable reference. - // Note: Implemented only in sub-classes that use the GPU. + // Use ContextProvider() for immediate use only, use + // ContextProviderWrapper() to obtain a retainable reference. Note: + // Implemented only in sub-classes that use the GPU. virtual WebGraphicsContext3DProvider* ContextProvider() const { return nullptr; }
diff --git a/third_party/WebKit/Source/platform/graphics/VideoFrameResourceProvider.cpp b/third_party/WebKit/Source/platform/graphics/VideoFrameResourceProvider.cpp index a355e81..8405674d 100644 --- a/third_party/WebKit/Source/platform/graphics/VideoFrameResourceProvider.cpp +++ b/third_party/WebKit/Source/platform/graphics/VideoFrameResourceProvider.cpp
@@ -9,6 +9,7 @@ #include "base/memory/ptr_util.h" #include "cc/resources/layer_tree_resource_provider.h" #include "cc/resources/video_resource_updater.h" +#include "components/viz/common/gpu/context_provider.h" #include "components/viz/common/quads/render_pass.h" #include "components/viz/common/quads/solid_color_draw_quad.h" #include "components/viz/common/quads/texture_draw_quad.h"
diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn index 96ede79..e2658a7 100644 --- a/third_party/libpng/BUILD.gn +++ b/third_party/libpng/BUILD.gn
@@ -4,6 +4,7 @@ import("//build/config/chromecast_build.gni") import("//build/config/arm.gni") +import("//build/config/mips.gni") config("libpng_config") { include_dirs = [ "." ] @@ -79,6 +80,11 @@ "PNG_ARM_NEON_OPT=2", "PNG_ARM_NEON_IMPLEMENTATION=1", ] + } else if (current_cpu == "mips64el" && mips_use_msa) { + sources += [ + "mips/filter_msa_intrinsics.c", + "mips/mips_init.c", + ] } configs -= [ "//build/config/compiler:chromium_code" ]
diff --git a/third_party/libpng/mips/filter_msa_intrinsics.c b/third_party/libpng/mips/filter_msa_intrinsics.c new file mode 100644 index 0000000..943bb3d0 --- /dev/null +++ b/third_party/libpng/mips/filter_msa_intrinsics.c
@@ -0,0 +1,807 @@ + +/* filter_msa_intrinsics.c - MSA optimised filter functions + * + * Copyright (c) 2016 Glenn Randers-Pehrson + * Written by Mandar Sahastrabuddhe, August 2016. + * Last changed in libpng 1.6.25 [September 1, 2016] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ +#include <stdio.h> +#include <stdint.h> +#include "../pngpriv.h" + +#ifdef PNG_READ_SUPPORTED + +/* This code requires -mfpu=msa on the command line: */ +#if PNG_MIPS_MSA_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */ + +#include <msa.h> + +/* libpng row pointers are not necessarily aligned to any particular boundary, + * however this code will only work with appropriate alignment. mips/mips_init.c + * checks for this (and will not compile unless it is done). This code uses + * variants of png_aligncast to avoid compiler warnings. + */ +#define png_ptr(type,pointer) png_aligncast(type *,pointer) +#define png_ptrc(type,pointer) png_aligncastconst(const type *,pointer) + +/* The following relies on a variable 'temp_pointer' being declared with type + * 'type'. This is written this way just to hide the GCC strict aliasing + * warning; note that the code is safe because there never is an alias between + * the input and output pointers. + */ +#define png_ldr(type,pointer)\ + (temp_pointer = png_ptr(type,pointer), *temp_pointer) + +#if PNG_MIPS_MSA_OPT > 0 + +#ifdef CLANG_BUILD + #define MSA_SRLI_B(a, b) __msa_srli_b((v16i8) a, b) + + #define LW(psrc) \ + ( { \ + uint8_t *psrc_lw_m = (uint8_t *) (psrc); \ + uint32_t val_m; \ + \ + asm volatile ( \ + "lw %[val_m], %[psrc_lw_m] \n\t" \ + \ + : [val_m] "=r" (val_m) \ + : [psrc_lw_m] "m" (*psrc_lw_m) \ + ); \ + \ + val_m; \ + } ) + + #define SH(val, pdst) \ + { \ + uint8_t *pdst_sh_m = (uint8_t *) (pdst); \ + uint16_t val_m = (val); \ + \ + asm volatile ( \ + "sh %[val_m], %[pdst_sh_m] \n\t" \ + \ + : [pdst_sh_m] "=m" (*pdst_sh_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + + #define SW(val, pdst) \ + { \ + uint8_t *pdst_sw_m = (uint8_t *) (pdst); \ + uint32_t val_m = (val); \ + \ + asm volatile ( \ + "sw %[val_m], %[pdst_sw_m] \n\t" \ + \ + : [pdst_sw_m] "=m" (*pdst_sw_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + + #if (__mips == 64) + #define SD(val, pdst) \ + { \ + uint8_t *pdst_sd_m = (uint8_t *) (pdst); \ + uint64_t val_m = (val); \ + \ + asm volatile ( \ + "sd %[val_m], %[pdst_sd_m] \n\t" \ + \ + : [pdst_sd_m] "=m" (*pdst_sd_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + #else + #define SD(val, pdst) \ + { \ + uint8_t *pdst_sd_m = (uint8_t *) (pdst); \ + uint32_t val0_m, val1_m; \ + \ + val0_m = (uint32_t) ((val) & 0x00000000FFFFFFFF); \ + val1_m = (uint32_t) (((val) >> 32) & 0x00000000FFFFFFFF); \ + \ + SW(val0_m, pdst_sd_m); \ + SW(val1_m, pdst_sd_m + 4); \ + } + #endif +#else + #define MSA_SRLI_B(a, b) (a >> b) + +#if (__mips_isa_rev >= 6) + #define LW(psrc) \ + ( { \ + uint8_t *psrc_lw_m = (uint8_t *) (psrc); \ + uint32_t val_m; \ + \ + asm volatile ( \ + "lw %[val_m], %[psrc_lw_m] \n\t" \ + \ + : [val_m] "=r" (val_m) \ + : [psrc_lw_m] "m" (*psrc_lw_m) \ + ); \ + \ + val_m; \ + } ) + + #define SH(val, pdst) \ + { \ + uint8_t *pdst_sh_m = (uint8_t *) (pdst); \ + uint16_t val_m = (val); \ + \ + asm volatile ( \ + "sh %[val_m], %[pdst_sh_m] \n\t" \ + \ + : [pdst_sh_m] "=m" (*pdst_sh_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + + #define SW(val, pdst) \ + { \ + uint8_t *pdst_sw_m = (uint8_t *) (pdst); \ + uint32_t val_m = (val); \ + \ + asm volatile ( \ + "sw %[val_m], %[pdst_sw_m] \n\t" \ + \ + : [pdst_sw_m] "=m" (*pdst_sw_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + + #if (__mips == 64) + #define SD(val, pdst) \ + { \ + uint8_t *pdst_sd_m = (uint8_t *) (pdst); \ + uint64_t val_m = (val); \ + \ + asm volatile ( \ + "sd %[val_m], %[pdst_sd_m] \n\t" \ + \ + : [pdst_sd_m] "=m" (*pdst_sd_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + #else + #define SD(val, pdst) \ + { \ + uint8_t *pdst_sd_m = (uint8_t *) (pdst); \ + uint32_t val0_m, val1_m; \ + \ + val0_m = (uint32_t) ((val) & 0x00000000FFFFFFFF); \ + val1_m = (uint32_t) (((val) >> 32) & 0x00000000FFFFFFFF); \ + \ + SW(val0_m, pdst_sd_m); \ + SW(val1_m, pdst_sd_m + 4); \ + } + #endif +#else // !(__mips_isa_rev >= 6) + #define LW(psrc) \ + ( { \ + uint8_t *psrc_lw_m = (uint8_t *) (psrc); \ + uint32_t val_m; \ + \ + asm volatile ( \ + "ulw %[val_m], %[psrc_lw_m] \n\t" \ + \ + : [val_m] "=r" (val_m) \ + : [psrc_lw_m] "m" (*psrc_lw_m) \ + ); \ + \ + val_m; \ + } ) + + #define SH(val, pdst) \ + { \ + uint8_t *pdst_sh_m = (uint8_t *) (pdst); \ + uint16_t val_m = (val); \ + \ + asm volatile ( \ + "ush %[val_m], %[pdst_sh_m] \n\t" \ + \ + : [pdst_sh_m] "=m" (*pdst_sh_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + + #define SW(val, pdst) \ + { \ + uint8_t *pdst_sw_m = (uint8_t *) (pdst); \ + uint32_t val_m = (val); \ + \ + asm volatile ( \ + "usw %[val_m], %[pdst_sw_m] \n\t" \ + \ + : [pdst_sw_m] "=m" (*pdst_sw_m) \ + : [val_m] "r" (val_m) \ + ); \ + } + + #define SD(val, pdst) \ + { \ + uint8_t *pdst_sd_m = (uint8_t *) (pdst); \ + uint32_t val0_m, val1_m; \ + \ + val0_m = (uint32_t) ((val) & 0x00000000FFFFFFFF); \ + val1_m = (uint32_t) (((val) >> 32) & 0x00000000FFFFFFFF); \ + \ + SW(val0_m, pdst_sd_m); \ + SW(val1_m, pdst_sd_m + 4); \ + } + + #define SW_ZERO(pdst) \ + { \ + uint8_t *pdst_m = (uint8_t *) (pdst); \ + \ + asm volatile ( \ + "usw $0, %[pdst_m] \n\t" \ + \ + : [pdst_m] "=m" (*pdst_m) \ + : \ + ); \ + } +#endif // (__mips_isa_rev >= 6) +#endif + +#define LD_B(RTYPE, psrc) *((RTYPE *) (psrc)) +#define LD_UB(...) LD_B(v16u8, __VA_ARGS__) +#define LD_B2(RTYPE, psrc, stride, out0, out1) \ +{ \ + out0 = LD_B(RTYPE, (psrc)); \ + out1 = LD_B(RTYPE, (psrc) + stride); \ +} +#define LD_UB2(...) LD_B2(v16u8, __VA_ARGS__) +#define LD_B4(RTYPE, psrc, stride, out0, out1, out2, out3) \ +{ \ + LD_B2(RTYPE, (psrc), stride, out0, out1); \ + LD_B2(RTYPE, (psrc) + 2 * stride , stride, out2, out3); \ +} +#define LD_UB4(...) LD_B4(v16u8, __VA_ARGS__) + +#define ST_B(RTYPE, in, pdst) *((RTYPE *) (pdst)) = (in) +#define ST_UB(...) ST_B(v16u8, __VA_ARGS__) +#define ST_B2(RTYPE, in0, in1, pdst, stride) \ +{ \ + ST_B(RTYPE, in0, (pdst)); \ + ST_B(RTYPE, in1, (pdst) + stride); \ +} +#define ST_UB2(...) ST_B2(v16u8, __VA_ARGS__) +#define ST_B4(RTYPE, in0, in1, in2, in3, pdst, stride) \ +{ \ + ST_B2(RTYPE, in0, in1, (pdst), stride); \ + ST_B2(RTYPE, in2, in3, (pdst) + 2 * stride, stride); \ +} +#define ST_UB4(...) ST_B4(v16u8, __VA_ARGS__) + +#define ADD2(in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = in0 + in1; \ + out1 = in2 + in3; \ +} +#define ADD3(in0, in1, in2, in3, in4, in5, \ + out0, out1, out2) \ +{ \ + ADD2(in0, in1, in2, in3, out0, out1); \ + out2 = in4 + in5; \ +} +#define ADD4(in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ADD2(in0, in1, in2, in3, out0, out1); \ + ADD2(in4, in5, in6, in7, out2, out3); \ +} + +#define ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_b((v16i8) in0, (v16i8) in1); \ + out1 = (RTYPE) __msa_ilvr_b((v16i8) in2, (v16i8) in3); \ +} +#define ILVR_B2_SH(...) ILVR_B2(v8i16, __VA_ARGS__) + +#define HSUB_UB2(RTYPE, in0, in1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_hsub_u_h((v16u8) in0, (v16u8) in0); \ + out1 = (RTYPE) __msa_hsub_u_h((v16u8) in1, (v16u8) in1); \ +} +#define HSUB_UB2_SH(...) HSUB_UB2(v8i16, __VA_ARGS__) + +#define SLDI_B2_0(RTYPE, in0, in1, out0, out1, slide_val) \ +{ \ + v16i8 zero_m = { 0 }; \ + out0 = (RTYPE) __msa_sldi_b((v16i8) zero_m, (v16i8) in0, slide_val); \ + out1 = (RTYPE) __msa_sldi_b((v16i8) zero_m, (v16i8) in1, slide_val); \ +} +#define SLDI_B2_0_UB(...) SLDI_B2_0(v16u8, __VA_ARGS__) + +#define SLDI_B3_0(RTYPE, in0, in1, in2, out0, out1, out2, slide_val) \ +{ \ + v16i8 zero_m = { 0 }; \ + SLDI_B2_0(RTYPE, in0, in1, out0, out1, slide_val); \ + out2 = (RTYPE) __msa_sldi_b((v16i8) zero_m, (v16i8) in2, slide_val); \ +} +#define SLDI_B3_0_UB(...) SLDI_B3_0(v16u8, __VA_ARGS__) + +#define ILVEV_W2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvev_w((v4i32) in1, (v4i32) in0); \ + out1 = (RTYPE) __msa_ilvev_w((v4i32) in3, (v4i32) in2); \ +} +#define ILVEV_W2_UB(...) ILVEV_W2(v16u8, __VA_ARGS__) + +#define ADD_ABS_H3(RTYPE, in0, in1, in2, out0, out1, out2) \ +{ \ + RTYPE zero = {0}; \ + \ + out0 = __msa_add_a_h((v8i16) zero, in0); \ + out1 = __msa_add_a_h((v8i16) zero, in1); \ + out2 = __msa_add_a_h((v8i16) zero, in2); \ +} +#define ADD_ABS_H3_SH(...) ADD_ABS_H3(v8i16, __VA_ARGS__) + +#define VSHF_B2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_vshf_b((v16i8) mask0, (v16i8) in1, (v16i8) in0); \ + out1 = (RTYPE) __msa_vshf_b((v16i8) mask1, (v16i8) in3, (v16i8) in2); \ +} +#define VSHF_B2_UB(...) VSHF_B2(v16u8, __VA_ARGS__) + +#define CMP_AND_SELECT(inp0, inp1, inp2, inp3, inp4, inp5, out0) \ +{ \ + v8i16 _sel_h0, _sel_h1; \ + v16u8 _sel_b0, _sel_b1; \ + _sel_h0 = (v8i16) __msa_clt_u_h((v8u16) inp1, (v8u16) inp0); \ + _sel_b0 = (v16u8) __msa_pckev_b((v16i8) _sel_h0, (v16i8) _sel_h0); \ + inp0 = (v8i16) __msa_bmnz_v((v16u8) inp0, (v16u8) inp1, (v16u8) _sel_h0); \ + inp4 = (v16u8) __msa_bmnz_v(inp3, inp4, _sel_b0); \ + _sel_h1 = (v8i16) __msa_clt_u_h((v8u16) inp2, (v8u16) inp0); \ + _sel_b1 = (v16u8) __msa_pckev_b((v16i8) _sel_h1, (v16i8) _sel_h1); \ + inp4 = (v16u8) __msa_bmnz_v(inp4, inp5, _sel_b1); \ + out0 += inp4; \ +} + +void png_read_filter_row_up_msa(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t i, cnt, cnt16, cnt32; + png_size_t istop = row_info->rowbytes; + png_bytep rp = row; + png_const_bytep pp = prev_row; + v16u8 src0, src1, src2, src3, src4, src5, src6, src7; + + for (i = 0; i < (istop >> 6); i++) + { + LD_UB4(rp, 16, src0, src1, src2, src3); + LD_UB4(pp, 16, src4, src5, src6, src7); + pp += 64; + + ADD4(src0, src4, src1, src5, src2, src6, src3, src7, + src0, src1, src2, src3); + + ST_UB4(src0, src1, src2, src3, rp, 16); + rp += 64; + } + + if (istop & 0x3F) + { + cnt32 = istop & 0x20; + cnt16 = istop & 0x10; + cnt = istop & 0xF; + + if(cnt32) + { + if (cnt16 && cnt) + { + LD_UB4(rp, 16, src0, src1, src2, src3); + LD_UB4(pp, 16, src4, src5, src6, src7); + + ADD4(src0, src4, src1, src5, src2, src6, src3, src7, + src0, src1, src2, src3); + + ST_UB4(src0, src1, src2, src3, rp, 16); + rp += 64; + } + else if (cnt16 || cnt) + { + LD_UB2(rp, 16, src0, src1); + LD_UB2(pp, 16, src4, src5); + pp += 32; + src2 = LD_UB(rp + 32); + src6 = LD_UB(pp); + + ADD3(src0, src4, src1, src5, src2, src6, src0, src1, src2); + + ST_UB2(src0, src1, rp, 16); + rp += 32; + ST_UB(src2, rp); + rp += 16; + } + else + { + LD_UB2(rp, 16, src0, src1); + LD_UB2(pp, 16, src4, src5); + + ADD2(src0, src4, src1, src5, src0, src1); + + ST_UB2(src0, src1, rp, 16); + rp += 32; + } + } + else if (cnt16 && cnt) + { + LD_UB2(rp, 16, src0, src1); + LD_UB2(pp, 16, src4, src5); + + ADD2(src0, src4, src1, src5, src0, src1); + + ST_UB2(src0, src1, rp, 16); + rp += 32; + } + else if (cnt16 || cnt) + { + src0 = LD_UB(rp); + src4 = LD_UB(pp); + pp += 16; + + src0 += src4; + + ST_UB(src0, rp); + rp += 16; + } + } +} + +void png_read_filter_row_sub4_msa(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t count; + png_size_t istop = row_info->rowbytes; + png_bytep src = row; + png_bytep nxt = row + 4; + int32_t inp0; + v16u8 src0, src1, src2, src3, src4; + v16u8 dst0, dst1; + v16u8 zero = { 0 }; + + istop -= 4; + + inp0 = LW(src); + src += 4; + src0 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp0); + + for (count = 0; count < istop; count += 16) + { + src1 = LD_UB(src); + src += 16; + + src2 = (v16u8) __msa_sldi_b((v16i8) zero, (v16i8) src1, 4); + src3 = (v16u8) __msa_sldi_b((v16i8) zero, (v16i8) src1, 8); + src4 = (v16u8) __msa_sldi_b((v16i8) zero, (v16i8) src1, 12); + src1 += src0; + src2 += src1; + src3 += src2; + src4 += src3; + src0 = src4; + ILVEV_W2_UB(src1, src2, src3, src4, dst0, dst1); + dst0 = (v16u8) __msa_pckev_d((v2i64) dst1, (v2i64) dst0); + + ST_UB(dst0, nxt); + nxt += 16; + } +} + +void png_read_filter_row_sub3_msa(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t count; + png_size_t istop = row_info->rowbytes; + png_bytep src = row; + png_bytep nxt = row + 3; + int64_t out0; + int32_t inp0, out1; + v16u8 src0, src1, src2, src3, src4, dst0, dst1; + v16u8 zero = { 0 }; + v16i8 mask0 = { 0, 1, 2, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + v16i8 mask1 = { 0, 1, 2, 3, 4, 5, 16, 17, 18, 19, 20, 21, 0, 0, 0, 0 }; + + istop -= 3; + + inp0 = LW(src); + src += 3; + src0 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp0); + + for (count = 0; count < istop; count += 12) + { + src1 = LD_UB(src); + src += 12; + + src2 = (v16u8) __msa_sldi_b((v16i8) zero, (v16i8) src1, 3); + src3 = (v16u8) __msa_sldi_b((v16i8) zero, (v16i8) src1, 6); + src4 = (v16u8) __msa_sldi_b((v16i8) zero, (v16i8) src1, 9); + src1 += src0; + src2 += src1; + src3 += src2; + src4 += src3; + src0 = src4; + VSHF_B2_UB(src1, src2, src3, src4, mask0, mask0, dst0, dst1); + dst0 = (v16u8) __msa_vshf_b(mask1, (v16i8) dst1, (v16i8) dst0); + out0 = __msa_copy_s_d((v2i64) dst0, 0); + out1 = __msa_copy_s_w((v4i32) dst0, 2); + + SD(out0, nxt); + nxt += 8; + SW(out1, nxt); + nxt += 4; + } +} + +void png_read_filter_row_avg4_msa(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t i; + png_bytep src = row; + png_bytep nxt = row; + png_const_bytep pp = prev_row; + png_size_t istop = row_info->rowbytes - 4; + int32_t inp0, inp1, out0; + v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, dst0, dst1; + v16u8 zero = { 0 }; + + inp0 = LW(pp); + pp += 4; + inp1 = LW(src); + src += 4; + src0 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp0); + src1 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp1); + src0 = (v16u8) MSA_SRLI_B(src0, 1); + src1 += src0; + out0 = __msa_copy_s_w((v4i32) src1, 0); + SW(out0, nxt); + nxt += 4; + + for (i = 0; i < istop; i += 16) + { + src2 = LD_UB(pp); + pp += 16; + src6 = LD_UB(src); + src += 16; + + SLDI_B2_0_UB(src2, src6, src3, src7, 4); + SLDI_B2_0_UB(src2, src6, src4, src8, 8); + SLDI_B2_0_UB(src2, src6, src5, src9, 12); + src2 = __msa_ave_u_b(src2, src1); + src6 += src2; + src3 = __msa_ave_u_b(src3, src6); + src7 += src3; + src4 = __msa_ave_u_b(src4, src7); + src8 += src4; + src5 = __msa_ave_u_b(src5, src8); + src9 += src5; + src1 = src9; + ILVEV_W2_UB(src6, src7, src8, src9, dst0, dst1); + dst0 = (v16u8) __msa_pckev_d((v2i64) dst1, (v2i64) dst0); + + ST_UB(dst0, nxt); + nxt += 16; + } +} + +void png_read_filter_row_avg3_msa(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t i; + png_bytep src = row; + png_bytep nxt = row; + png_const_bytep pp = prev_row; + png_size_t istop = row_info->rowbytes - 3; + int64_t out0; + int32_t inp0, inp1, out1; + int16_t out2; + v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, dst0, dst1; + v16u8 zero = { 0 }; + v16i8 mask0 = { 0, 1, 2, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + v16i8 mask1 = { 0, 1, 2, 3, 4, 5, 16, 17, 18, 19, 20, 21, 0, 0, 0, 0 }; + + inp0 = LW(pp); + pp += 3; + inp1 = LW(src); + src += 3; + src0 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp0); + src1 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp1); + src0 = (v16u8) MSA_SRLI_B(src0, 1); + src1 += src0; + out2 = __msa_copy_s_h((v8i16) src1, 0); + SH(out2, nxt); + nxt += 2; + nxt[0] = src1[2]; + nxt++; + + for (i = 0; i < istop; i += 12) + { + src2 = LD_UB(pp); + pp += 12; + src6 = LD_UB(src); + src += 12; + + SLDI_B2_0_UB(src2, src6, src3, src7, 3); + SLDI_B2_0_UB(src2, src6, src4, src8, 6); + SLDI_B2_0_UB(src2, src6, src5, src9, 9); + src2 = __msa_ave_u_b(src2, src1); + src6 += src2; + src3 = __msa_ave_u_b(src3, src6); + src7 += src3; + src4 = __msa_ave_u_b(src4, src7); + src8 += src4; + src5 = __msa_ave_u_b(src5, src8); + src9 += src5; + src1 = src9; + VSHF_B2_UB(src6, src7, src8, src9, mask0, mask0, dst0, dst1); + dst0 = (v16u8) __msa_vshf_b(mask1, (v16i8) dst1, (v16i8) dst0); + out0 = __msa_copy_s_d((v2i64) dst0, 0); + out1 = __msa_copy_s_w((v4i32) dst0, 2); + + SD(out0, nxt); + nxt += 8; + SW(out1, nxt); + nxt += 4; + } +} + +void png_read_filter_row_paeth4_msa(png_row_infop row_info, + png_bytep row, + png_const_bytep prev_row) +{ + int32_t count, rp_end; + png_bytep nxt; + png_const_bytep prev_nxt; + int32_t inp0, inp1, res0; + v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9; + v16u8 src10, src11, src12, src13, dst0, dst1; + v8i16 vec0, vec1, vec2; + v16u8 zero = { 0 }; + + nxt = row; + prev_nxt = prev_row; + + inp0 = LW(nxt); + inp1 = LW(prev_nxt); + prev_nxt += 4; + src0 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp0); + src1 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp1); + + src1 += src0; + res0 = __msa_copy_s_w((v4i32) src1, 0); + + SW(res0, nxt); + nxt += 4; + + /* Remainder */ + rp_end = row_info->rowbytes - 4; + + for (count = 0; count < rp_end; count += 16) + { + src2 = LD_UB(prev_nxt); + prev_nxt += 16; + src6 = LD_UB(prev_row); + prev_row += 16; + src10 = LD_UB(nxt); + + SLDI_B3_0_UB(src2, src6, src10, src3, src7, src11, 4); + SLDI_B3_0_UB(src2, src6, src10, src4, src8, src12, 8); + SLDI_B3_0_UB(src2, src6, src10, src5, src9, src13, 12); + ILVR_B2_SH(src2, src6, src1, src6, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src1, src2, src6, src10); + ILVR_B2_SH(src3, src7, src10, src7, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src10, src3, src7, src11); + ILVR_B2_SH(src4, src8, src11, src8, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src11, src4, src8, src12); + ILVR_B2_SH(src5, src9, src12, src9, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src12, src5, src9, src13); + src1 = src13; + ILVEV_W2_UB(src10, src11, src12, src1, dst0, dst1); + dst0 = (v16u8) __msa_pckev_d((v2i64) dst1, (v2i64) dst0); + + ST_UB(dst0, nxt); + nxt += 16; + } +} + +void png_read_filter_row_paeth3_msa(png_row_infop row_info, + png_bytep row, + png_const_bytep prev_row) +{ + int32_t count, rp_end; + png_bytep nxt; + png_const_bytep prev_nxt; + int64_t out0; + int32_t inp0, inp1, out1; + int16_t out2; + v16u8 src0, src1, src2, src3, src4, src5, src6, src7, src8, src9, dst0, dst1; + v16u8 src10, src11, src12, src13; + v8i16 vec0, vec1, vec2; + v16u8 zero = { 0 }; + v16i8 mask0 = { 0, 1, 2, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + v16i8 mask1 = { 0, 1, 2, 3, 4, 5, 16, 17, 18, 19, 20, 21, 0, 0, 0, 0 }; + + nxt = row; + prev_nxt = prev_row; + + inp0 = LW(nxt); + inp1 = LW(prev_nxt); + prev_nxt += 3; + src0 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp0); + src1 = (v16u8) __msa_insert_w((v4i32) zero, 0, inp1); + + src1 += src0; + out2 = __msa_copy_s_h((v8i16) src1, 0); + + SH(out2, nxt); + nxt += 2; + nxt[0] = src1[2]; + nxt++; + + /* Remainder */ + rp_end = row_info->rowbytes - 3; + + for (count = 0; count < rp_end; count += 12) + { + src2 = LD_UB(prev_nxt); + prev_nxt += 12; + src6 = LD_UB(prev_row); + prev_row += 12; + src10 = LD_UB(nxt); + + SLDI_B3_0_UB(src2, src6, src10, src3, src7, src11, 3); + SLDI_B3_0_UB(src2, src6, src10, src4, src8, src12, 6); + SLDI_B3_0_UB(src2, src6, src10, src5, src9, src13, 9); + ILVR_B2_SH(src2, src6, src1, src6, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src1, src2, src6, src10); + ILVR_B2_SH(src3, src7, src10, src7, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src10, src3, src7, src11); + ILVR_B2_SH(src4, src8, src11, src8, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src11, src4, src8, src12); + ILVR_B2_SH(src5, src9, src12, src9, vec0, vec1); + HSUB_UB2_SH(vec0, vec1, vec0, vec1); + vec2 = vec0 + vec1; + ADD_ABS_H3_SH(vec0, vec1, vec2, vec0, vec1, vec2); + CMP_AND_SELECT(vec0, vec1, vec2, src12, src5, src9, src13); + src1 = src13; + VSHF_B2_UB(src10, src11, src12, src13, mask0, mask0, dst0, dst1); + dst0 = (v16u8) __msa_vshf_b(mask1, (v16i8) dst1, (v16i8) dst0); + out0 = __msa_copy_s_d((v2i64) dst0, 0); + out1 = __msa_copy_s_w((v4i32) dst0, 2); + + SD(out0, nxt); + nxt += 8; + SW(out1, nxt); + nxt += 4; + } +} + +#endif /* PNG_MIPS_MSA_OPT > 0 */ +#endif /* PNG_MIPS_MSA_IMPLEMENTATION == 1 (intrinsics) */ +#endif /* READ */
diff --git a/third_party/libpng/mips/mips_init.c b/third_party/libpng/mips/mips_init.c new file mode 100644 index 0000000..0bfb7a3 --- /dev/null +++ b/third_party/libpng/mips/mips_init.c
@@ -0,0 +1,129 @@ + +/* mips_init.c - MSA optimised filter functions + * + * Copyright (c) 2016 Glenn Randers-Pehrson + * Written by Mandar Sahastrabuddhe, 2016. + * Last changed in libpng 1.6.25 [September 1, 2016] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ +/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are + * called. + */ +#define _POSIX_SOURCE 1 + +#include <stdio.h> +#include "../pngpriv.h" + +#ifdef PNG_READ_SUPPORTED + +#if PNG_MIPS_MSA_OPT > 0 +#ifdef PNG_MIPS_MSA_CHECK_SUPPORTED /* Do run-time checks */ +/* WARNING: it is strongly recommended that you do not build libpng with + * run-time checks for CPU features if at all possible. In the case of the MIPS + * MSA instructions there is no processor-specific way of detecting the + * presence of the required support, therefore run-time detection is extremely + * OS specific. + * + * You may set the macro PNG_MIPS_MSA_FILE to the file name of file containing + * a fragment of C source code which defines the png_have_msa function. There + * are a number of implementations in contrib/mips-msa, but the only one that + * has partial support is contrib/mips-msa/linux.c - a generic Linux + * implementation which reads /proc/cpufino. + */ +#ifndef PNG_MIPS_MSA_FILE +# ifdef __linux__ +# define PNG_MIPS_MSA_FILE "contrib/mips-msa/linux.c" +# endif +#endif + +#ifdef PNG_MIPS_MSA_FILE + +#include <signal.h> /* for sig_atomic_t */ +static int png_have_msa(png_structp png_ptr); +#include PNG_MIPS_MSA_FILE + +#else /* PNG_MIPS_MSA_FILE */ +# error "PNG_MIPS_MSA_FILE undefined: no support for run-time MIPS MSA checks" +#endif /* PNG_MIPS_MSA_FILE */ +#endif /* PNG_MIPS_MSA_CHECK_SUPPORTED */ + +#ifndef PNG_ALIGNED_MEMORY_SUPPORTED +# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED" +#endif + +void +png_init_filter_functions_msa(png_structp pp, unsigned int bpp) +{ + /* The switch statement is compiled in for MIPS_MSA_API, the call to + * png_have_msa is compiled in for MIPS_MSA_CHECK. If both are defined + * the check is only performed if the API has not set the MSA option on + * or off explicitly. In this case the check controls what happens. + */ + +#ifdef PNG_MIPS_MSA_API_SUPPORTED + switch ((pp->options >> PNG_MIPS_MSA) & 3) + { + case PNG_OPTION_UNSET: + /* Allow the run-time check to execute if it has been enabled - + * thus both API and CHECK can be turned on. If it isn't supported + * this case will fall through to the 'default' below, which just + * returns. + */ +#endif /* PNG_MIPS_MSA_API_SUPPORTED */ +#ifdef PNG_MIPS_MSA_CHECK_SUPPORTED + { + static volatile sig_atomic_t no_msa = -1; /* not checked */ + + if (no_msa < 0) + no_msa = !png_have_msa(pp); + + if (no_msa) + return; + } +#ifdef PNG_MIPS_MSA_API_SUPPORTED + break; +#endif +#endif /* PNG_MIPS_MSA_CHECK_SUPPORTED */ + +#ifdef PNG_MIPS_MSA_API_SUPPORTED + default: /* OFF or INVALID */ + return; + + case PNG_OPTION_ON: + /* Option turned on */ + break; + } +#endif + + /* IMPORTANT: any new external functions used here must be declared using + * PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the + * 'prefix' option to configure works: + * + * ./configure --with-libpng-prefix=foobar_ + * + * Verify you have got this right by running the above command, doing a build + * and examining pngprefix.h; it must contain a #define for every external + * function you add. (Notice that this happens automatically for the + * initialization function.) + */ + pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_msa; + + if (bpp == 3) + { + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_msa; + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_msa; + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_msa; + } + + else if (bpp == 4) + { + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_msa; + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_msa; + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_msa; + } +} +#endif /* PNG_MIPS_MSA_OPT > 0 */ +#endif /* READ */
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 21e74403..c2a75e8 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -53330,6 +53330,9 @@ </histogram> <histogram name="NQE.Correlation.ResourceLoadTime.0Kb_128Kb"> + <obsolete> + Obsoleted in December 2017. + </obsolete> <owner>tbansal@chromium.org</owner> <owner>bengr@chromium.org</owner> <summary>
diff --git a/ui/compositor/test/in_process_context_provider.cc b/ui/compositor/test/in_process_context_provider.cc index 8309ae6..265c48b 100644 --- a/ui/compositor/test/in_process_context_provider.cc +++ b/ui/compositor/test/in_process_context_provider.cc
@@ -84,6 +84,14 @@ context_thread_checker_.CalledOnValidThread()); } +void InProcessContextProvider::AddRef() const { + base::RefCountedThreadSafe<InProcessContextProvider>::AddRef(); +} + +void InProcessContextProvider::Release() const { + base::RefCountedThreadSafe<InProcessContextProvider>::Release(); +} + gpu::ContextResult InProcessContextProvider::BindToCurrentThread() { // This is called on the thread the context will be used. DCHECK(context_thread_checker_.CalledOnValidThread()); @@ -136,7 +144,7 @@ return context_->GetImplementation(); } -gpu::raster::RasterInterface* InProcessContextProvider::RasterContext() { +gpu::raster::RasterInterface* InProcessContextProvider::RasterInterface() { CheckValidThreadOrLockAcquired(); return raster_context_.get();
diff --git a/ui/compositor/test/in_process_context_provider.h b/ui/compositor/test/in_process_context_provider.h index 9b8bd92..11e1263 100644 --- a/ui/compositor/test/in_process_context_provider.h +++ b/ui/compositor/test/in_process_context_provider.h
@@ -14,6 +14,7 @@ #include "base/synchronization/lock.h" #include "base/threading/thread_checker.h" #include "components/viz/common/gpu/context_provider.h" +#include "components/viz/common/gpu/raster_context_provider.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/ipc/common/surface_handle.h" #include "ui/gfx/native_widget_types.h" @@ -30,7 +31,10 @@ namespace ui { -class InProcessContextProvider : public viz::ContextProvider { +class InProcessContextProvider + : public base::RefCountedThreadSafe<InProcessContextProvider>, + public viz::ContextProvider, + public viz::RasterContextProvider { public: static scoped_refptr<InProcessContextProvider> Create( const gpu::gles2::ContextCreationAttribHelper& attribs, @@ -48,12 +52,14 @@ InProcessContextProvider* shared_context, bool support_locking); - // cc::ContextProvider implementation. + // viz::ContextProvider / viz::RasterContextProvider implementation. + void AddRef() const override; + void Release() const override; gpu::ContextResult BindToCurrentThread() override; const gpu::Capabilities& ContextCapabilities() const override; const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const override; gpu::gles2::GLES2Interface* ContextGL() override; - gpu::raster::RasterInterface* RasterContext() override; + gpu::raster::RasterInterface* RasterInterface() override; gpu::ContextSupport* ContextSupport() override; class GrContext* GrContext() override; viz::ContextCacheController* CacheController() override; @@ -67,6 +73,8 @@ uint32_t GetCopyTextureInternalFormat(); private: + friend class base::RefCountedThreadSafe<InProcessContextProvider>; + InProcessContextProvider( const gpu::gles2::ContextCreationAttribHelper& attribs, InProcessContextProvider* shared_context,