diff --git a/display_list/effects/dl_path_effect.h b/display_list/effects/dl_path_effect.h index ca310db351a1f..0f9d0be60fa54 100644 --- a/display_list/effects/dl_path_effect.h +++ b/display_list/effects/dl_path_effect.h @@ -9,7 +9,7 @@ #include "flutter/display_list/dl_attributes.h" #include "flutter/fml/logging.h" -#include "include/core/SkRect.h" +#include "third_party/skia/include/core/SkRect.h" namespace flutter { diff --git a/display_list/effects/dl_path_effect_unittests.cc b/display_list/effects/dl_path_effect_unittests.cc index 38f49fb8e8d96..37675fd94a43e 100644 --- a/display_list/effects/dl_path_effect_unittests.cc +++ b/display_list/effects/dl_path_effect_unittests.cc @@ -6,7 +6,7 @@ #include "flutter/display_list/testing/dl_test_equality.h" #include "flutter/display_list/utils/dl_comparable.h" #include "gtest/gtest.h" -#include "include/core/SkScalar.h" +#include "third_party/skia/include/core/SkScalar.h" namespace flutter { namespace testing { diff --git a/display_list/image/dl_image.h b/display_list/image/dl_image.h index 0b78b55a4c934..bc4a8602545ad 100644 --- a/display_list/image/dl_image.h +++ b/display_list/image/dl_image.h @@ -10,8 +10,8 @@ #include #include "flutter/fml/macros.h" -#include "include/core/SkRefCnt.h" #include "third_party/skia/include/core/SkImage.h" +#include "third_party/skia/include/core/SkRefCnt.h" namespace impeller { class Texture; diff --git a/display_list/skia/dl_sk_conversions_unittests.cc b/display_list/skia/dl_sk_conversions_unittests.cc index f330cc4f94adc..4a9b56fd76b1a 100644 --- a/display_list/skia/dl_sk_conversions_unittests.cc +++ b/display_list/skia/dl_sk_conversions_unittests.cc @@ -10,7 +10,7 @@ #include "flutter/display_list/dl_tile_mode.h" #include "flutter/display_list/dl_vertices.h" #include "gtest/gtest.h" -#include "include/core/SkSamplingOptions.h" +#include "third_party/skia/include/core/SkSamplingOptions.h" namespace flutter { namespace testing { diff --git a/display_list/testing/dl_test_snippets.h b/display_list/testing/dl_test_snippets.h index 94f7995d81eb5..1f05e77dc83c6 100644 --- a/display_list/testing/dl_test_snippets.h +++ b/display_list/testing/dl_test_snippets.h @@ -244,18 +244,6 @@ struct DisplayListInvocation { DlInvoker invoker; bool supports_group_opacity_ = false; - bool sk_version_matches() { - return (static_cast(op_count_) == sk_op_count_ && - byte_count_ == sk_byte_count_); - } - - // A negative sk_op_count means "do not test this op". - // Used mainly for these cases: - // - we cannot encode a DrawShadowRec (Skia private header) - // - SkCanvas cannot receive a DisplayList - // - SkCanvas may or may not inline an SkPicture - bool sk_testing_invalid() { return sk_op_count_ < 0; } - bool is_empty() { return byte_count_ == 0; } bool supports_group_opacity() { return supports_group_opacity_; } @@ -267,11 +255,6 @@ struct DisplayListInvocation { // to |DisplayList.byte_count(). size_t byte_count() { return sizeof(DisplayList) + byte_count_; } - int sk_op_count() { return sk_op_count_; } - // byte count for the ops with DisplayList overhead as translated - // through an SkCanvas interface, comparable to |DisplayList.byte_count(). - size_t sk_byte_count() { return sizeof(DisplayList) + sk_byte_count_; } - void Invoke(DlOpReceiver& builder) { invoker(builder); } // sk_sp Build() { diff --git a/flow/layers/display_list_raster_cache_item.h b/flow/layers/display_list_raster_cache_item.h index a542cb59743c9..5c431e1c54991 100644 --- a/flow/layers/display_list_raster_cache_item.h +++ b/flow/layers/display_list_raster_cache_item.h @@ -11,12 +11,8 @@ #include "flutter/display_list/display_list.h" #include "flutter/flow/embedded_views.h" #include "flutter/flow/raster_cache_item.h" -#include "include/core/SkCanvas.h" -#include "include/core/SkColorSpace.h" -#include "include/core/SkMatrix.h" -#include "include/core/SkPicture.h" -#include "include/core/SkPoint.h" -#include "include/core/SkRect.h" +#include "third_party/skia/include/core/SkMatrix.h" +#include "third_party/skia/include/core/SkPoint.h" namespace flutter { diff --git a/flow/layers/layer_tree.h b/flow/layers/layer_tree.h index 4e55953bee05a..5f573da2099a0 100644 --- a/flow/layers/layer_tree.h +++ b/flow/layers/layer_tree.h @@ -14,8 +14,6 @@ #include "flutter/flow/raster_cache.h" #include "flutter/fml/macros.h" #include "flutter/fml/time/time_delta.h" -#include "third_party/skia/include/core/SkPicture.h" -#include "third_party/skia/include/core/SkSize.h" class GrDirectContext; diff --git a/flow/raster_cache.cc b/flow/raster_cache.cc index ab1f185fcd264..92f22f8123cfc 100644 --- a/flow/raster_cache.cc +++ b/flow/raster_cache.cc @@ -18,7 +18,6 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColorSpace.h" #include "third_party/skia/include/core/SkImage.h" -#include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" diff --git a/flow/raster_cache.h b/flow/raster_cache.h index a683350f792dc..a00508f84d0af 100644 --- a/flow/raster_cache.h +++ b/flow/raster_cache.h @@ -14,10 +14,8 @@ #include "flutter/fml/macros.h" #include "flutter/fml/memory/weak_ptr.h" #include "flutter/fml/trace_event.h" -#include "include/core/SkMatrix.h" -#include "include/core/SkRect.h" -#include "third_party/skia/include/core/SkImage.h" -#include "third_party/skia/include/core/SkSize.h" +#include "third_party/skia/include/core/SkMatrix.h" +#include "third_party/skia/include/core/SkRect.h" class GrDirectContext; class SkColorSpace; @@ -182,16 +180,14 @@ class RasterCache { size_t GetLayerCachedEntriesCount() const; /** - * Return the number of map entries in the picture caches (SkPicture and - * DisplayList) regardless of whether the entries have been populated with - * an image. + * Return the number of map entries in the picture (DisplayList) cache + * regardless of whether the entries have been populated with an image. */ size_t GetPictureCachedEntriesCount() const; /** * @brief Estimate how much memory is used by picture raster cache entries in - * bytes, including cache entries in the SkPicture cache and the DisplayList - * cache. + * bytes. * * Only SkImage's memory usage is counted as other objects are often much * smaller compared to SkImage. SkImageInfo::computeMinByteSize is used to diff --git a/flow/raster_cache_unittests.cc b/flow/raster_cache_unittests.cc index 3cf00e235e836..e0dfda6593c8c 100644 --- a/flow/raster_cache_unittests.cc +++ b/flow/raster_cache_unittests.cc @@ -182,39 +182,6 @@ TEST(RasterCache, SetCheckboardCacheImages) { ASSERT_TRUE(did_draw_checkerboard); } -TEST(RasterCache, AccessThresholdOfZeroDisablesCachingForSkPicture) { - size_t threshold = 0; - flutter::RasterCache cache(threshold); - - SkMatrix matrix = SkMatrix::I(); - - auto display_list = GetSampleDisplayList(); - - MockCanvas dummy_canvas(1000, 1000); - DlPaint paint; - - LayerStateStack preroll_state_stack; - preroll_state_stack.set_preroll_delegate(kGiantRect, matrix); - LayerStateStack paint_state_stack; - preroll_state_stack.set_delegate(&dummy_canvas); - - FixedRefreshRateStopwatch raster_time; - FixedRefreshRateStopwatch ui_time; - PrerollContextHolder preroll_context_holder = GetSamplePrerollContextHolder( - preroll_state_stack, &cache, &raster_time, &ui_time); - PaintContextHolder paint_context_holder = GetSamplePaintContextHolder( - paint_state_stack, &cache, &raster_time, &ui_time); - auto& preroll_context = preroll_context_holder.preroll_context; - auto& paint_context = paint_context_holder.paint_context; - - cache.BeginFrame(); - DisplayListRasterCacheItem display_list_item(display_list, SkPoint(), true, - false); - ASSERT_FALSE(RasterCacheItemPrerollAndTryToRasterCache( - display_list_item, preroll_context, paint_context, matrix)); - ASSERT_FALSE(display_list_item.Draw(paint_context, &dummy_canvas, &paint)); -} - TEST(RasterCache, AccessThresholdOfZeroDisablesCachingForDisplayList) { size_t threshold = 0; flutter::RasterCache cache(threshold); @@ -249,46 +216,6 @@ TEST(RasterCache, AccessThresholdOfZeroDisablesCachingForDisplayList) { ASSERT_FALSE(display_list_item.Draw(paint_context, &dummy_canvas, &paint)); } -TEST(RasterCache, PictureCacheLimitPerFrameIsRespectedWhenZeroForSkPicture) { - size_t picture_cache_limit_per_frame = 0; - flutter::RasterCache cache(3, picture_cache_limit_per_frame); - - SkMatrix matrix = SkMatrix::I(); - - auto display_list = GetSampleDisplayList(); - - MockCanvas dummy_canvas(1000, 1000); - DlPaint paint; - - LayerStateStack preroll_state_stack; - preroll_state_stack.set_preroll_delegate(kGiantRect, matrix); - LayerStateStack paint_state_stack; - preroll_state_stack.set_delegate(&dummy_canvas); - - FixedRefreshRateStopwatch raster_time; - FixedRefreshRateStopwatch ui_time; - PrerollContextHolder preroll_context_holder = GetSamplePrerollContextHolder( - preroll_state_stack, &cache, &raster_time, &ui_time); - PaintContextHolder paint_context_holder = GetSamplePaintContextHolder( - paint_state_stack, &cache, &raster_time, &ui_time); - auto& preroll_context = preroll_context_holder.preroll_context; - auto& paint_context = paint_context_holder.paint_context; - - cache.BeginFrame(); - - DisplayListRasterCacheItem display_list_item(display_list, SkPoint(), true, - false); - ASSERT_FALSE(RasterCacheItemPrerollAndTryToRasterCache( - display_list_item, preroll_context, paint_context, matrix)); - ASSERT_FALSE(display_list_item.Draw(paint_context, &dummy_canvas, &paint)); - ASSERT_FALSE(RasterCacheItemPrerollAndTryToRasterCache( - display_list_item, preroll_context, paint_context, matrix)); - ASSERT_FALSE(display_list_item.Draw(paint_context, &dummy_canvas, &paint)); - ASSERT_FALSE(RasterCacheItemPrerollAndTryToRasterCache( - display_list_item, preroll_context, paint_context, matrix)); - ASSERT_FALSE(display_list_item.Draw(paint_context, &dummy_canvas, &paint)); -} - TEST(RasterCache, PictureCacheLimitPerFrameIsRespectedWhenZeroForDisplayList) { size_t picture_cache_limit_per_frame = 0; flutter::RasterCache cache(3, picture_cache_limit_per_frame); diff --git a/flow/testing/mock_raster_cache.h b/flow/testing/mock_raster_cache.h index e3478b38c3942..877351f5c251f 100644 --- a/flow/testing/mock_raster_cache.h +++ b/flow/testing/mock_raster_cache.h @@ -20,7 +20,7 @@ namespace testing { /** * @brief A RasterCacheResult implementation that represents a cached Layer or - * SkPicture without the overhead of storage. + * DisplayList without the overhead of storage. * * This implementation is used by MockRasterCache only for testing proper usage * of the RasterCache in layer unit tests. @@ -50,7 +50,7 @@ static std::vector raster_cache_items_; /** * @brief A RasterCache implementation that simulates the act of rendering a - * Layer or SkPicture without the overhead of rasterization or pixel storage. + * Layer or DisplayList without the overhead of rasterization or pixel storage. * This implementation is used only for testing proper usage of the RasterCache * in layer unit tests. */ diff --git a/lib/ui/compositing/scene.h b/lib/ui/compositing/scene.h index a8a3614f64977..55ca5cd0bead0 100644 --- a/lib/ui/compositing/scene.h +++ b/lib/ui/compositing/scene.h @@ -10,7 +10,6 @@ #include "flutter/flow/layers/layer_tree.h" #include "flutter/lib/ui/dart_wrapper.h" -#include "third_party/skia/include/core/SkPicture.h" namespace flutter { diff --git a/lib/ui/painting/picture.h b/lib/ui/painting/picture.h index 89c84095336ed..6d41cbe8dad68 100644 --- a/lib/ui/painting/picture.h +++ b/lib/ui/painting/picture.h @@ -10,7 +10,6 @@ #include "flutter/lib/ui/dart_wrapper.h" #include "flutter/lib/ui/painting/image.h" #include "flutter/lib/ui/ui_dart_state.h" -#include "third_party/skia/include/core/SkPicture.h" namespace flutter { class Canvas; diff --git a/lib/ui/snapshot_delegate.h b/lib/ui/snapshot_delegate.h index ce5594befb834..2c3677d8551a8 100644 --- a/lib/ui/snapshot_delegate.h +++ b/lib/ui/snapshot_delegate.h @@ -10,7 +10,6 @@ #include "flutter/common/graphics/texture.h" #include "flutter/display_list/display_list.h" #include "third_party/skia/include/core/SkImage.h" -#include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/GrContextThreadSafeProxy.h" #include "third_party/skia/include/gpu/GrDirectContext.h" diff --git a/shell/common/engine.h b/shell/common/engine.h index ca258ac392159..e0a4701f87b0e 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -32,7 +32,6 @@ #include "flutter/shell/common/rasterizer.h" #include "flutter/shell/common/run_configuration.h" #include "flutter/shell/common/shell_io_manager.h" -#include "third_party/skia/include/core/SkPicture.h" namespace flutter { @@ -345,7 +344,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { /// snapshot a specified scene. The engine /// cannot snapshot a scene on the UI thread /// directly because the scene (described via - /// an `SkPicture`) may reference resources on + /// a `DisplayList`) may reference resources on /// the GPU and there is no GPU context current /// on the UI thread. The delegate is a /// component that has access to all the diff --git a/shell/common/persistent_cache_unittests.cc b/shell/common/persistent_cache_unittests.cc index d58b929994609..e184bf2d57eef 100644 --- a/shell/common/persistent_cache_unittests.cc +++ b/shell/common/persistent_cache_unittests.cc @@ -17,7 +17,6 @@ #include "flutter/shell/common/switches.h" #include "flutter/shell/version/version.h" #include "flutter/testing/testing.h" -#include "include/core/SkPicture.h" namespace flutter { namespace testing { diff --git a/shell/common/serialization_callbacks.cc b/shell/common/serialization_callbacks.cc index 14f42c694e682..9423c5b757983 100644 --- a/shell/common/serialization_callbacks.cc +++ b/shell/common/serialization_callbacks.cc @@ -3,13 +3,11 @@ // found in the LICENSE file. #include "flutter/fml/logging.h" -#include "include/core/SkColorSpace.h" -#include "include/core/SkImage.h" -#include "include/core/SkImageInfo.h" -#include "include/core/SkPicture.h" -#include "include/core/SkSerialProcs.h" -#include "include/core/SkStream.h" -#include "include/core/SkTypeface.h" +#include "third_party/skia/include/core/SkColorSpace.h" +#include "third_party/skia/include/core/SkImage.h" +#include "third_party/skia/include/core/SkImageInfo.h" +#include "third_party/skia/include/core/SkStream.h" +#include "third_party/skia/include/core/SkTypeface.h" namespace flutter { diff --git a/shell/common/serialization_callbacks.h b/shell/common/serialization_callbacks.h index fa148094b72b1..66d7a549d82c3 100644 --- a/shell/common/serialization_callbacks.h +++ b/shell/common/serialization_callbacks.h @@ -6,9 +6,8 @@ #define FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_ #include "flutter/fml/logging.h" -#include "include/core/SkImage.h" -#include "include/core/SkPicture.h" -#include "include/core/SkTypeface.h" +#include "third_party/skia/include/core/SkImage.h" +#include "third_party/skia/include/core/SkTypeface.h" namespace flutter { diff --git a/testing/mock_canvas.cc b/testing/mock_canvas.cc index e72a27cd6c644..75b03107e2a75 100644 --- a/testing/mock_canvas.cc +++ b/testing/mock_canvas.cc @@ -7,7 +7,6 @@ #include "flutter/fml/logging.h" #include "flutter/testing/display_list_testing.h" #include "third_party/skia/include/core/SkImageInfo.h" -#include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/core/SkSerialProcs.h" #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTextBlob.h"