From 8ad20db8ea366f509ac38b12bd77c411f7e6a545 Mon Sep 17 00:00:00 2001 From: Sherry Zhou Date: Tue, 19 Dec 2023 20:04:06 -0800 Subject: [PATCH] Clean up USE_SKIA_NEXT b/304784019 --- cobalt/dom/BUILD.gn | 4 - cobalt/dom/lottie_player.cc | 4 - cobalt/renderer/BUILD.gn | 6 - cobalt/renderer/rasterizer/egl/BUILD.gn | 10 - .../rasterizer/egl/hardware_rasterizer.cc | 22 - cobalt/renderer/rasterizer/skia/BUILD.gn | 14 - .../renderer/rasterizer/skia/hardware_image.h | 15 - .../rasterizer/skia/hardware_rasterizer.cc | 18 - .../rasterizer/skia/hardware_rasterizer.h | 8 - .../skia/hardware_resource_provider.h | 4 - .../skia/render_tree_node_visitor.cc | 46 -- cobalt/renderer/rasterizer/skia/skia/BUILD.gn | 53 +- .../skia/skia/config/SkUserConfig.h | 4 - .../rasterizer/skia/skia/skia_next.gni | 21 - .../rasterizer/skia/skia/skia_sources.gni | 469 ++++++++---------- .../rasterizer/skia/skia/skia_template.gni | 6 +- .../skia/skia/src/ports/SkFontMgr_cobalt.cc | 2 - .../skia/skia/src/ports/SkFontMgr_cobalt.h | 2 - cobalt/renderer/render_tree_pixel_tester.cc | 14 - third_party/skia/include/core/SkTypes.h | 5 - 20 files changed, 237 insertions(+), 490 deletions(-) delete mode 100644 cobalt/renderer/rasterizer/skia/skia/skia_next.gni diff --git a/cobalt/dom/BUILD.gn b/cobalt/dom/BUILD.gn index 7a0ce1bc5f18..1aaf5351d2ec 100644 --- a/cobalt/dom/BUILD.gn +++ b/cobalt/dom/BUILD.gn @@ -310,10 +310,6 @@ static_library("dom") { "xml_serializer.h", ] - if (use_skia_next) { - defines = [ "USE_SKIA_NEXT" ] - } - public_deps = [ ":media_settings", "//cobalt/browser:generated_types", diff --git a/cobalt/dom/lottie_player.cc b/cobalt/dom/lottie_player.cc index 10e23973f9cb..01f37df1d21b 100644 --- a/cobalt/dom/lottie_player.cc +++ b/cobalt/dom/lottie_player.cc @@ -127,11 +127,7 @@ std::string LottiePlayer::preserve_aspect_ratio() const { std::string LottiePlayer::renderer() const { // Cobalt uses a custom compiled-in renderer. -#if defined(USE_SKIA_NEXT) return "skottie-m97"; -#else - return "skottie-m79"; -#endif } void LottiePlayer::Load(std::string src) { diff --git a/cobalt/renderer/BUILD.gn b/cobalt/renderer/BUILD.gn index 845f4eb5e0a8..3d251e523fa7 100644 --- a/cobalt/renderer/BUILD.gn +++ b/cobalt/renderer/BUILD.gn @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//cobalt/renderer/rasterizer/skia/skia/skia_next.gni") - source_set("renderer_headers_only") { sources = [ "egl_and_gles.h", @@ -86,10 +84,6 @@ static_library("render_tree_pixel_tester") { configs -= [ "//starboard/build/config:size" ] configs += [ "//starboard/build/config:speed" ] - if (use_skia_next) { - include_dirs = [ skia_include_dir ] - } - deps = [ ":renderer", "//cobalt/base", diff --git a/cobalt/renderer/rasterizer/egl/BUILD.gn b/cobalt/renderer/rasterizer/egl/BUILD.gn index ce17947fe157..51363e67dfa6 100644 --- a/cobalt/renderer/rasterizer/egl/BUILD.gn +++ b/cobalt/renderer/rasterizer/egl/BUILD.gn @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//cobalt/renderer/rasterizer/skia/skia/skia_next.gni") - static_library("software_rasterizer") { sources = [ "software_rasterizer.cc", @@ -25,10 +23,6 @@ static_library("software_rasterizer") { configs -= [ "//starboard/build/config:size" ] configs += [ "//starboard/build/config:speed" ] - if (use_skia_next) { - include_dirs = [ skia_include_dir ] - } - deps = [ "//base", "//cobalt/math", @@ -93,10 +87,6 @@ static_library("hardware_rasterizer") { configs -= [ "//starboard/build/config:size" ] configs += [ "//starboard/build/config:speed" ] - if (use_skia_next) { - include_dirs = [ skia_include_dir ] - } - deps = [ ":software_rasterizer", "//base", diff --git a/cobalt/renderer/rasterizer/egl/hardware_rasterizer.cc b/cobalt/renderer/rasterizer/egl/hardware_rasterizer.cc index d8256513e49f..aecdcedf7be0 100644 --- a/cobalt/renderer/rasterizer/egl/hardware_rasterizer.cc +++ b/cobalt/renderer/rasterizer/egl/hardware_rasterizer.cc @@ -37,11 +37,7 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkRefCnt.h" #include "third_party/skia/include/core/SkSurface.h" -#ifdef USE_SKIA_NEXT #include "third_party/skia/include/gpu/GrDirectContext.h" -#else -#include "third_party/skia/include/gpu/GrContext.h" -#endif namespace cobalt { namespace renderer { @@ -82,15 +78,9 @@ class HardwareRasterizer::Impl { void ReleaseContext() { graphics_context_->ReleaseCurrentContext(); } private: -#ifdef USE_SKIA_NEXT GrDirectContext* GetFallbackContext() { return fallback_rasterizer_->GetGrContext(); } -#else - GrContext* GetFallbackContext() { - return fallback_rasterizer_->GetGrContext(); - } -#endif void ResetFallbackContextDuringFrame(); void FlushFallbackOffscreenDraws(); @@ -239,16 +229,9 @@ void HardwareRasterizer::Impl::FlushFallbackOffscreenDraws() { void HardwareRasterizer::Impl::ResetFallbackContextDuringFrame() { // Perform a minimal reset of the fallback context. Only need to invalidate // states that this rasterizer pollutes. -#ifdef USE_SKIA_NEXT uint32_t untouched_states = kMSAAEnable_GrGLBackendState | kStencil_GrGLBackendState | kPixelStore_GrGLBackendState | kFixedFunction_GrGLBackendState; -#else - uint32_t untouched_states = - kMSAAEnable_GrGLBackendState | kStencil_GrGLBackendState | - kPixelStore_GrGLBackendState | kFixedFunction_GrGLBackendState | - kPathRendering_GrGLBackendState; -#endif GetFallbackContext()->resetContext(~untouched_states & kAll_GrBackendState); } @@ -322,12 +305,7 @@ sk_sp HardwareRasterizer::Impl::CreateFallbackSurface( 0, info); uint32_t flags = 0; -#ifdef USE_SKIA_NEXT SkSurfaceProps skia_surface_props(flags, kUnknown_SkPixelGeometry); -#else - SkSurfaceProps skia_surface_props(flags, - SkSurfaceProps::kLegacyFontHost_InitType); -#endif return SkSurface::MakeFromBackendRenderTarget( GetFallbackContext(), skia_render_target, kBottomLeft_GrSurfaceOrigin, kRGBA_8888_SkColorType, nullptr, &skia_surface_props); diff --git a/cobalt/renderer/rasterizer/skia/BUILD.gn b/cobalt/renderer/rasterizer/skia/BUILD.gn index abb46ad47cd2..11146dfec974 100644 --- a/cobalt/renderer/rasterizer/skia/BUILD.gn +++ b/cobalt/renderer/rasterizer/skia/BUILD.gn @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//cobalt/renderer/rasterizer/skia/skia/skia_next.gni") - static_library("common") { visibility = [ ":*" ] @@ -44,10 +42,6 @@ static_library("common") { configs -= [ "//starboard/build/config:size" ] configs += [ "//starboard/build/config:speed" ] - if (use_skia_next) { - include_dirs = [ skia_include_dir ] - } - public_deps = [ "//base", "//cobalt/base", @@ -84,10 +78,6 @@ static_library("hardware_rasterizer") { configs -= [ "//starboard/build/config:size" ] configs += [ "//starboard/build/config:speed" ] - if (use_skia_next) { - include_dirs = [ skia_include_dir ] - } - deps = [ ":common", "//cobalt/renderer:renderer_headers_only", @@ -111,9 +101,5 @@ static_library("software_rasterizer") { configs -= [ "//starboard/build/config:size" ] configs += [ "//starboard/build/config:speed" ] - if (use_skia_next) { - include_dirs = [ skia_include_dir ] - } - deps = [ ":common" ] } diff --git a/cobalt/renderer/rasterizer/skia/hardware_image.h b/cobalt/renderer/rasterizer/skia/hardware_image.h index 1cb4493dcb5e..797c5e054517 100644 --- a/cobalt/renderer/rasterizer/skia/hardware_image.h +++ b/cobalt/renderer/rasterizer/skia/hardware_image.h @@ -26,23 +26,16 @@ #include "cobalt/renderer/backend/egl/texture.h" #include "cobalt/renderer/backend/egl/texture_data.h" #include "cobalt/renderer/rasterizer/skia/image.h" -#ifdef USE_SKIA_NEXT #include "third_party/skia/include/gpu/GrDirectContext.h" #include "third_party/skia/include/gpu/GrTypes.h" // included for GrMipMapped // alias -#else -#include "third_party/skia/include/gpu/GrContext.h" -#include "third_party/skia/include/gpu/GrTexture.h" -#endif namespace cobalt { namespace renderer { namespace rasterizer { namespace skia { -#ifdef USE_SKIA_NEXT using GrContext = GrDirectContext; -#endif // We use GL RGBA formats to indicate that a texture has 4 channels, but those // 4 channels may not always strictly mean red, green, blue and alpha. This @@ -57,14 +50,6 @@ typedef base::Callback& render_target)> SubmitOffscreenCallback; -#ifndef USE_SKIA_NEXT -// Wraps a Cobalt backend::TextureEGL with a Skia GrTexture, and returns the -// Skia ref-counted GrTexture object (that takes ownership of the cobalt -// texture). -GrTexture* CobaltTextureToSkiaTexture( - GrContext* gr_context, std::unique_ptr cobalt_texture); -#endif - // Forwards ImageData methods on to TextureData methods. class HardwareImageData : public render_tree::ImageData { public: diff --git a/cobalt/renderer/rasterizer/skia/hardware_rasterizer.cc b/cobalt/renderer/rasterizer/skia/hardware_rasterizer.cc index 02a2b3c063da..80213fb49c0c 100644 --- a/cobalt/renderer/rasterizer/skia/hardware_rasterizer.cc +++ b/cobalt/renderer/rasterizer/skia/hardware_rasterizer.cc @@ -39,15 +39,8 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" -#ifdef USE_SKIA_NEXT #include "third_party/skia/include/gpu/GrDirectContext.h" -#else -#include "third_party/skia/include/gpu/GrContext.h" -#endif #include "third_party/skia/include/gpu/GrContextOptions.h" -#ifndef USE_SKIA_NEXT -#include "third_party/skia/include/gpu/GrTexture.h" -#endif #include "third_party/skia/include/gpu/gl/GrGLInterface.h" #include "third_party/skia/src/gpu/GrRenderTarget.h" #include "third_party/skia/src/gpu/GrResourceProvider.h" @@ -157,11 +150,7 @@ namespace { SkSurfaceProps GetRenderTargetSurfaceProps(bool force_deterministic_rendering) { uint32_t flags = 0; -#ifdef USE_SKIA_NEXT return SkSurfaceProps(flags, kUnknown_SkPixelGeometry); -#else - return SkSurfaceProps(flags, SkSurfaceProps::kLegacyFontHost_InitType); -#endif } // Takes meta-data from a Cobalt RenderTarget object and uses it to fill out @@ -524,16 +513,9 @@ void HardwareRasterizer::Impl::RenderTextureEGL( } // Let Skia know that we've modified GL state. -#ifdef USE_SKIA_NEXT uint32_t untouched_states = kMSAAEnable_GrGLBackendState | kStencil_GrGLBackendState | kPixelStore_GrGLBackendState | kFixedFunction_GrGLBackendState; -#else - uint32_t untouched_states = - kMSAAEnable_GrGLBackendState | kStencil_GrGLBackendState | - kPixelStore_GrGLBackendState | kFixedFunction_GrGLBackendState | - kPathRendering_GrGLBackendState; -#endif gr_context_->resetContext(~untouched_states & kAll_GrBackendState); } diff --git a/cobalt/renderer/rasterizer/skia/hardware_rasterizer.h b/cobalt/renderer/rasterizer/skia/hardware_rasterizer.h index 6ae58fbc049c..1693e9590882 100644 --- a/cobalt/renderer/rasterizer/skia/hardware_rasterizer.h +++ b/cobalt/renderer/rasterizer/skia/hardware_rasterizer.h @@ -22,11 +22,7 @@ #include "cobalt/renderer/backend/render_target.h" #include "cobalt/renderer/rasterizer/rasterizer.h" -#ifdef USE_SKIA_NEXT class GrDirectContext; -#else -class GrContext; -#endif class SkCanvas; namespace cobalt { @@ -80,11 +76,7 @@ class HardwareRasterizer : public Rasterizer { const scoped_refptr& render_target); render_tree::ResourceProvider* GetResourceProvider() override; -#ifdef USE_SKIA_NEXT GrDirectContext* GetGrContext(); -#else - GrContext* GetGrContext(); -#endif void MakeCurrent() override; void ReleaseContext() override; diff --git a/cobalt/renderer/rasterizer/skia/hardware_resource_provider.h b/cobalt/renderer/rasterizer/skia/hardware_resource_provider.h index 231cdd9e5226..adc324569984 100644 --- a/cobalt/renderer/rasterizer/skia/hardware_resource_provider.h +++ b/cobalt/renderer/rasterizer/skia/hardware_resource_provider.h @@ -26,11 +26,7 @@ #include "cobalt/renderer/rasterizer/skia/hardware_image.h" #include "cobalt/renderer/rasterizer/skia/text_shaper.h" #include "third_party/skia/include/core/SkFontMgr.h" -#ifdef USE_SKIA_NEXT #include "third_party/skia/include/gpu/GrDirectContext.h" -#else -#include "third_party/skia/include/gpu/GrContext.h" -#endif namespace cobalt { namespace renderer { diff --git a/cobalt/renderer/rasterizer/skia/render_tree_node_visitor.cc b/cobalt/renderer/rasterizer/skia/render_tree_node_visitor.cc index 77b22a4ba7b3..f94c665115c6 100644 --- a/cobalt/renderer/rasterizer/skia/render_tree_node_visitor.cc +++ b/cobalt/renderer/rasterizer/skia/render_tree_node_visitor.cc @@ -50,21 +50,13 @@ #include "cobalt/renderer/rasterizer/skia/software_image.h" #include "third_party/skia/include/core/SkBlendMode.h" #include "third_party/skia/include/core/SkClipOp.h" -#include "third_party/skia/include/core/SkFilterQuality.h" #include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkRRect.h" #include "third_party/skia/include/core/SkRegion.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/core/SkTypeface.h" -#ifdef USE_SKIA_NEXT #include "third_party/skia/include/effects/SkImageFilters.h" -#else -#include "third_party/skia/include/effects/SkBlurImageFilter.h" -#endif #include "third_party/skia/include/effects/SkBlurMaskFilter.h" -#ifndef USE_SKIA_NEXT -#include "third_party/skia/include/effects/SkDropShadowImageFilter.h" -#endif #include "third_party/skia/include/effects/SkGradientShader.h" // Setting this define to 1 will enable TRACE_EVENT calls to be made from @@ -251,13 +243,8 @@ void ApplyBlurFilterToPaint( SkPaint* paint, const base::Optional& blur_filter) { if (blur_filter && blur_filter->blur_sigma() > 0.0f) { -#ifdef USE_SKIA_NEXT sk_sp skia_blur_filter(SkImageFilters::Blur( blur_filter->blur_sigma(), blur_filter->blur_sigma(), nullptr)); -#else - sk_sp skia_blur_filter(SkBlurImageFilter::Make( - blur_filter->blur_sigma(), blur_filter->blur_sigma(), nullptr)); -#endif paint->setImageFilter(skia_blur_filter); } } @@ -328,11 +315,6 @@ void RenderTreeNodeVisitor::RenderFilterViaOffscreenSurface( if (filter_node.opacity_filter) { paint.setARGB(filter_node.opacity_filter->opacity() * 255, 255, 255, 255); } -#ifndef USE_SKIA_NEXT - // Use nearest neighbor when filtering texture data, since the source and - // destination rectangles should be exactly equal. - paint.setFilterQuality(kNone_SkFilterQuality); -#endif // We've already used the draw_state_.render_target's scale when rendering to // the offscreen surface, so reset the scale for now. @@ -352,14 +334,9 @@ void RenderTreeNodeVisitor::RenderFilterViaOffscreenSurface( SkRect source_rect = SkRect::MakeWH(surface_bounds.width(), surface_bounds.height()); -#ifdef USE_SKIA_NEXT draw_state_.render_target->drawImageRect(image.get(), source_rect, dest_rect, SkSamplingOptions(), &paint, SkCanvas::kStrict_SrcRectConstraint); -#else - draw_state_.render_target->drawImageRect(image.get(), source_rect, dest_rect, - &paint); -#endif // Finally restore our parent render target's original transform for the // next draw call. @@ -577,10 +554,6 @@ bool LocalCoordsStaysWithinUnitBox(const math::Matrix3F& mat) { SkPaint CreateSkPaintForImageRendering( const RenderTreeNodeVisitorDrawState& draw_state, bool is_opaque) { SkPaint paint; -#ifndef USE_SKIA_NEXT - // |kLow_SkFilterQuality| is used for bilinear interpolation of images. - paint.setFilterQuality(kLow_SkFilterQuality); -#endif if (!IsOpaque(draw_state.opacity)) { paint.setAlpha(draw_state.opacity * 255); @@ -620,15 +593,10 @@ void RenderSinglePlaneImage(SinglePlaneImage* single_plane_image, if (image) { SkRect src = SkRect::MakeXYWH(x, y, width, height); -#ifdef USE_SKIA_NEXT draw_state->render_target->drawImageRect( image.get(), src, CobaltRectFToSkiaRect(destination_rect), SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kNone), &paint, SkCanvas::kStrict_SrcRectConstraint); -#else - draw_state->render_target->drawImageRect( - image, src, CobaltRectFToSkiaRect(destination_rect), &paint); -#endif } } else { // Use the more general approach which allows arbitrary local texture @@ -639,15 +607,10 @@ void RenderSinglePlaneImage(SinglePlaneImage* single_plane_image, &skia_local_transform); if (image) { -#ifdef USE_SKIA_NEXT sk_sp image_shader = image->makeShader( SkTileMode::kRepeat, SkTileMode::kRepeat, SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kNone), &skia_local_transform); -#else - sk_sp image_shader = image->makeShader( - SkTileMode::kRepeat, SkTileMode::kRepeat, &skia_local_transform); -#endif paint.setShader(image_shader); @@ -1451,16 +1414,10 @@ void DrawSolidRoundedRectBorderSoftware( canvas.flush(); SkPaint render_target_paint; -#ifdef USE_SKIA_NEXT bitmap.setImmutable(); sk_sp image = SkImage::MakeFromBitmap(bitmap); draw_state->render_target->drawImage( image, rect.x(), rect.y(), SkSamplingOptions(), &render_target_paint); -#else - render_target_paint.setFilterQuality(kNone_SkFilterQuality); - draw_state->render_target->drawBitmap(bitmap, rect.x(), rect.y(), - &render_target_paint); -#endif } void DrawSolidRoundedRectBorder( @@ -1781,9 +1738,6 @@ void RenderText(SkCanvas* render_target, if (blur_sigma > 0.0f) { sk_sp mf( SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, blur_sigma)); -#ifndef USE_SKIA_NEXT - paint.setFilterQuality(SkFilterQuality::kHigh_SkFilterQuality); -#endif paint.setMaskFilter(mf); } diff --git a/cobalt/renderer/rasterizer/skia/skia/BUILD.gn b/cobalt/renderer/rasterizer/skia/skia/BUILD.gn index dbb75ce3efb5..da5df6815942 100644 --- a/cobalt/renderer/rasterizer/skia/skia/BUILD.gn +++ b/cobalt/renderer/rasterizer/skia/skia/BUILD.gn @@ -12,27 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//cobalt/renderer/rasterizer/skia/skia/skia_next.gni") import("//cobalt/renderer/rasterizer/skia/skia/skia_sources.gni") import("//cobalt/renderer/rasterizer/skia/skia/skia_template.gni") # skia_opts_none and skia_opts targets contain the platform-specific optimizations for Skia config("skia_opts_none") { include_dirs = [ - "//third_party/$skia_subdir/include/core", - "//third_party/$skia_subdir/include/effects", - "//third_party/$skia_subdir/src/core", - "//third_party/$skia_subdir/src/utils", + "//third_party/skia/include/core", + "//third_party/skia/include/effects", + "//third_party/skia/src/core", + "//third_party/skia/src/utils", ] } config("skia_opts") { include_dirs = [ - "//third_party/$skia_subdir/include/core", - "//third_party/$skia_subdir/include/effects", - "//third_party/$skia_subdir/src/core", - "//third_party/$skia_subdir/src/opts", - "//third_party/$skia_subdir/src/utils", + "//third_party/skia/include/core", + "//third_party/skia/include/effects", + "//third_party/skia/src/core", + "//third_party/skia/src/opts", + "//third_party/skia/src/utils", ] } @@ -70,18 +69,18 @@ config("skia_library_config") { config("skia_library_config_public") { include_dirs = [ #temporary until we can hide SkFontHost - "//third_party/$skia_subdir", - "//third_party/$skia_subdir/src/core", - "//third_party/$skia_subdir/src/utils", - "//third_party/$skia_subdir/include/core", - "//third_party/$skia_subdir/include/effects", - "//third_party/$skia_subdir/include/gpu", - "//third_party/$skia_subdir/include/lazy", - "//third_party/$skia_subdir/include/pathops", - "//third_party/$skia_subdir/include/pipe", - "//third_party/$skia_subdir/include/ports", - "//third_party/$skia_subdir/include/private", - "//third_party/$skia_subdir/include/utils", + "//third_party/skia", + "//third_party/skia/src/core", + "//third_party/skia/src/utils", + "//third_party/skia/include/core", + "//third_party/skia/include/effects", + "//third_party/skia/include/gpu", + "//third_party/skia/include/lazy", + "//third_party/skia/include/pathops", + "//third_party/skia/include/pipe", + "//third_party/skia/include/ports", + "//third_party/skia/include/private", + "//third_party/skia/include/utils", ] defines = [ "SK_BUILD_NO_OPTS" ] @@ -113,7 +112,7 @@ skia_common("skia_library") { ":skia_library_no_asan", "//base", "//starboard/common", - "//third_party/$skia_subdir/third_party/skcms", + "//third_party/skia/third_party/skcms", "//third_party/freetype2", "//third_party/libpng", "//third_party/zlib", @@ -152,16 +151,8 @@ skia_common("skia") { sources += [ "src/ports/SkMemory_starboard.cc" ] } - if (!use_skia_next) { - sources += [ "src/ports/SkTLS_cobalt.cc" ] - } - include_dirs = [ target_gen_dir ] - if (use_skia_next) { - include_dirs += [ skia_include_dir ] - } - deps = [ "//base", "//cobalt/base", diff --git a/cobalt/renderer/rasterizer/skia/skia/config/SkUserConfig.h b/cobalt/renderer/rasterizer/skia/skia/config/SkUserConfig.h index f3b37a2989f6..c977bed3b4c6 100644 --- a/cobalt/renderer/rasterizer/skia/skia/config/SkUserConfig.h +++ b/cobalt/renderer/rasterizer/skia/skia/config/SkUserConfig.h @@ -18,9 +18,7 @@ #define SkUserConfig_DEFINED // NOLINT #if defined(STARBOARD) -#if defined(USE_SKIA_NEXT) #include "base/logging.h" -#endif #include "starboard/configuration.h" #include "starboard/configuration_constants.h" #include "starboard/types.h" @@ -272,7 +270,6 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, // The block below is copied from Skia m79's SkPostConfig.h to preserve the // behavior of SK_GL being defined by default. -#ifdef USE_SKIA_NEXT /** * If GPU is enabled but no GPU backends are enabled then enable GL by default. * Traditionally clients have relied on Skia always building with the GL backend @@ -283,6 +280,5 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, #define SK_GL #endif #endif -#endif #endif // SkUserConfig_DEFINED NOLINT diff --git a/cobalt/renderer/rasterizer/skia/skia/skia_next.gni b/cobalt/renderer/rasterizer/skia/skia/skia_next.gni deleted file mode 100644 index 054bbc1c4c4a..000000000000 --- a/cobalt/renderer/rasterizer/skia/skia/skia_next.gni +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2022 The Cobalt Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -skia_subdir = "skia" -skia_include_dir = "" - -if (use_skia_next) { - skia_subdir = "skia_next/third_party/skia" - skia_include_dir = "//third_party/skia_next" -} diff --git a/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni b/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni index 52357771326b..e7c36c65adf0 100644 --- a/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni +++ b/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni @@ -12,43 +12,42 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//cobalt/renderer/rasterizer/skia/skia/skia_next.gni") -import("//third_party/$skia_subdir/gn/core.gni") -import("//third_party/$skia_subdir/gn/effects.gni") -import("//third_party/$skia_subdir/gn/effects_imagefilters.gni") -import("//third_party/$skia_subdir/gn/gpu.gni") -import("//third_party/$skia_subdir/gn/utils.gni") -import("//third_party/$skia_subdir/modules/skottie/skottie.gni") -import("//third_party/$skia_subdir/modules/sksg/sksg.gni") -import("//third_party/$skia_subdir/modules/skshaper/skshaper.gni") +import("//third_party/skia/gn/core.gni") +import("//third_party/skia/gn/effects.gni") +import("//third_party/skia/gn/effects_imagefilters.gni") +import("//third_party/skia/gn/gpu.gni") +import("//third_party/skia/gn/utils.gni") +import("//third_party/skia/modules/skottie/skottie.gni") +import("//third_party/skia/modules/sksg/sksg.gni") +import("//third_party/skia/modules/skshaper/skshaper.gni") combined_sources = [] shared_sources = [ - "//third_party/$skia_subdir/src/codec/SkBmpBaseCodec.cpp", - "//third_party/$skia_subdir/src/codec/SkBmpCodec.cpp", - "//third_party/$skia_subdir/src/codec/SkBmpMaskCodec.cpp", - "//third_party/$skia_subdir/src/codec/SkBmpRLECodec.cpp", - "//third_party/$skia_subdir/src/codec/SkBmpStandardCodec.cpp", - "//third_party/$skia_subdir/src/codec/SkCodec.cpp", - "//third_party/$skia_subdir/src/codec/SkCodecImageGenerator.cpp", - "//third_party/$skia_subdir/src/codec/SkColorTable.cpp", - "//third_party/$skia_subdir/src/codec/SkMaskSwizzler.cpp", - "//third_party/$skia_subdir/src/codec/SkMasks.cpp", - "//third_party/$skia_subdir/src/codec/SkSampledCodec.cpp", - "//third_party/$skia_subdir/src/codec/SkSampler.cpp", - "//third_party/$skia_subdir/src/codec/SkStreamBuffer.cpp", - "//third_party/$skia_subdir/src/codec/SkSwizzler.cpp", - "//third_party/$skia_subdir/src/codec/SkWbmpCodec.cpp", - "//third_party/$skia_subdir/src/images/SkImageEncoder.cpp", - "//third_party/$skia_subdir/src/ports/SkDiscardableMemory_none.cpp", - "//third_party/$skia_subdir/src/ports/SkFontHost_FreeType.cpp", - "//third_party/$skia_subdir/src/ports/SkFontHost_FreeType_common.cpp", - "//third_party/$skia_subdir/src/ports/SkFontHost_FreeType_common.h", - "//third_party/$skia_subdir/src/ports/SkGlobalInitialization_default.cpp", - "//third_party/$skia_subdir/src/ports/SkImageGenerator_skia.cpp", - "//third_party/$skia_subdir/src/sfnt/SkOTTable_name.cpp", - "//third_party/$skia_subdir/src/sfnt/SkOTUtils.cpp", + "//third_party/skia/src/codec/SkBmpBaseCodec.cpp", + "//third_party/skia/src/codec/SkBmpCodec.cpp", + "//third_party/skia/src/codec/SkBmpMaskCodec.cpp", + "//third_party/skia/src/codec/SkBmpRLECodec.cpp", + "//third_party/skia/src/codec/SkBmpStandardCodec.cpp", + "//third_party/skia/src/codec/SkCodec.cpp", + "//third_party/skia/src/codec/SkCodecImageGenerator.cpp", + "//third_party/skia/src/codec/SkColorTable.cpp", + "//third_party/skia/src/codec/SkMaskSwizzler.cpp", + "//third_party/skia/src/codec/SkMasks.cpp", + "//third_party/skia/src/codec/SkSampledCodec.cpp", + "//third_party/skia/src/codec/SkSampler.cpp", + "//third_party/skia/src/codec/SkStreamBuffer.cpp", + "//third_party/skia/src/codec/SkSwizzler.cpp", + "//third_party/skia/src/codec/SkWbmpCodec.cpp", + "//third_party/skia/src/images/SkImageEncoder.cpp", + "//third_party/skia/src/ports/SkDiscardableMemory_none.cpp", + "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", + "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", + "//third_party/skia/src/ports/SkFontHost_FreeType_common.h", + "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp", + "//third_party/skia/src/ports/SkImageGenerator_skia.cpp", + "//third_party/skia/src/sfnt/SkOTTable_name.cpp", + "//third_party/skia/src/sfnt/SkOTUtils.cpp", ] # from "core.gni" @@ -61,9 +60,7 @@ combined_sources += skia_effects_imagefilter_sources # from "gpu.gni" combined_sources += skia_gpu_sources combined_sources += skia_gl_gpu_sources -if (use_skia_next) { - combined_sources += skia_shared_gpu_sources -} +combined_sources += skia_shared_gpu_sources combined_sources += skia_utils_sources combined_sources += skia_skottie_sources @@ -73,233 +70,193 @@ combined_sources += skia_shaper_primitive_sources # Exclude all unused skia files combined_sources -= [ # codec - "//third_party/$skia_subdir/src/codec/SkSampledCodec.cpp", + "//third_party/skia/src/codec/SkSampledCodec.cpp", # core - "//third_party/$skia_subdir/src/core/SkTime.cpp", + "//third_party/skia/src/core/SkTime.cpp", # utils bitmap - "//third_party/$skia_subdir/src/utils/SkCamera.cpp", - "//third_party/$skia_subdir/src/utils/SkCanvasStack.h", - "//third_party/$skia_subdir/src/utils/SkFloatUtils.h", - "//third_party/$skia_subdir/src/utils/SkParseColor.cpp", - "//third_party/$skia_subdir/src/utils/SkParsePath.cpp", - "//third_party/$skia_subdir/src/utils/SkThreadUtils_pthread.cpp", - "//third_party/$skia_subdir/src/utils/SkThreadUtils_win.cpp", + "//third_party/skia/src/utils/SkCamera.cpp", + "//third_party/skia/src/utils/SkCanvasStack.h", + "//third_party/skia/src/utils/SkFloatUtils.h", + "//third_party/skia/src/utils/SkParseColor.cpp", + "//third_party/skia/src/utils/SkParsePath.cpp", + "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp", + "//third_party/skia/src/utils/SkThreadUtils_win.cpp", # mac - "//third_party/$skia_subdir/src/utils/mac/SkCreateCGImageRef.cpp", + "//third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp", # windows - "//third_party/$skia_subdir/src/utils/win/SkAutoCoInitialize.cpp", - "//third_party/$skia_subdir/src/utils/win/SkAutoCoInitialize.h", - "//third_party/$skia_subdir/src/utils/win/SkDWrite.cpp", - "//third_party/$skia_subdir/src/utils/win/SkDWrite.h", - "//third_party/$skia_subdir/src/utils/win/SkDWriteFontFileStream.cpp", - "//third_party/$skia_subdir/src/utils/win/SkDWriteFontFileStream.h", - "//third_party/$skia_subdir/src/utils/win/SkDWriteGeometrySink.cpp", - "//third_party/$skia_subdir/src/utils/win/SkDWriteGeometrySink.h", - "//third_party/$skia_subdir/src/utils/win/SkHRESULT.cpp", - "//third_party/$skia_subdir/src/utils/win/SkHRESULT.h", - "//third_party/$skia_subdir/src/utils/win/SkIStream.cpp", - "//third_party/$skia_subdir/src/utils/win/SkIStream.h", - "//third_party/$skia_subdir/src/utils/win/SkTScopedComPtr.h", - "//third_party/$skia_subdir/src/utils/win/SkWGL.h", - "//third_party/$skia_subdir/src/utils/win/SkWGL_win.cpp", + "//third_party/skia/src/utils/win/SkAutoCoInitialize.cpp", + "//third_party/skia/src/utils/win/SkAutoCoInitialize.h", + "//third_party/skia/src/utils/win/SkDWrite.cpp", + "//third_party/skia/src/utils/win/SkDWrite.h", + "//third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp", + "//third_party/skia/src/utils/win/SkDWriteFontFileStream.h", + "//third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp", + "//third_party/skia/src/utils/win/SkDWriteGeometrySink.h", + "//third_party/skia/src/utils/win/SkHRESULT.cpp", + "//third_party/skia/src/utils/win/SkHRESULT.h", + "//third_party/skia/src/utils/win/SkIStream.cpp", + "//third_party/skia/src/utils/win/SkIStream.h", + "//third_party/skia/src/utils/win/SkTScopedComPtr.h", + "//third_party/skia/src/utils/win/SkWGL.h", + "//third_party/skia/src/utils/win/SkWGL_win.cpp", ] -# Exclude unused skia files which only exist in m79. -if (!use_skia_next) { - combined_sources -= [ - # utils bitmap - "//third_party/$skia_subdir/src/utils/SkFrontBufferedStream.cpp", - "//third_party/$skia_subdir/src/utils/SkInterpolator.cpp", - ] -} - -if (use_skia_next) { - sksl_sources = [ - "//third_party/$skia_subdir/include/sksl/DSLBlock.h", - "//third_party/$skia_subdir/include/sksl/DSLCase.h", - "//third_party/$skia_subdir/include/sksl/DSLCore.h", - "//third_party/$skia_subdir/include/sksl/DSLExpression.h", - "//third_party/$skia_subdir/include/sksl/DSLFunction.h", - "//third_party/$skia_subdir/include/sksl/DSLLayout.h", - "//third_party/$skia_subdir/include/sksl/DSLStatement.h", - "//third_party/$skia_subdir/include/sksl/DSLSymbols.h", - "//third_party/$skia_subdir/include/sksl/DSLType.h", - "//third_party/$skia_subdir/include/sksl/DSLVar.h", - "//third_party/$skia_subdir/src/sksl/SkSLAnalysis.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLAnalysis.h", - "//third_party/$skia_subdir/src/sksl/SkSLBuiltinTypes.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLBuiltinTypes.h", - "//third_party/$skia_subdir/src/sksl/SkSLCompiler.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLCompiler.h", - "//third_party/$skia_subdir/src/sksl/SkSLConstantFolder.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLConstantFolder.h", - "//third_party/$skia_subdir/src/sksl/SkSLContext.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLContext.h", - "//third_party/$skia_subdir/src/sksl/SkSLDSLParser.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLDSLParser.h", - "//third_party/$skia_subdir/src/sksl/SkSLErrorReporter.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLInliner.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLInliner.h", - "//third_party/$skia_subdir/src/sksl/SkSLIntrinsicMap.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLIntrinsicMap.h", - "//third_party/$skia_subdir/src/sksl/SkSLLexer.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLLexer.h", - "//third_party/$skia_subdir/src/sksl/SkSLMangler.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLMangler.h", - "//third_party/$skia_subdir/src/sksl/SkSLOperators.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLOperators.h", - "//third_party/$skia_subdir/src/sksl/SkSLOutputStream.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLOutputStream.h", - "//third_party/$skia_subdir/src/sksl/SkSLPool.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLPool.h", - "//third_party/$skia_subdir/src/sksl/SkSLRehydrator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLRehydrator.h", - "//third_party/$skia_subdir/src/sksl/SkSLSampleUsage.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLString.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLThreadContext.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLThreadContext.h", - "//third_party/$skia_subdir/src/sksl/SkSLUtil.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLUtil.h", - "//third_party/$skia_subdir/src/sksl/analysis/SkSLCanExitWithoutReturningValue.cpp", - "//third_party/$skia_subdir/src/sksl/analysis/SkSLCheckProgramUnrolledSize.cpp", - "//third_party/$skia_subdir/src/sksl/analysis/SkSLGetLoopUnrollInfo.cpp", - "//third_party/$skia_subdir/src/sksl/analysis/SkSLIsConstantExpression.cpp", - "//third_party/$skia_subdir/src/sksl/analysis/SkSLProgramUsage.cpp", - "//third_party/$skia_subdir/src/sksl/analysis/SkSLSwitchCaseContainsExit.cpp", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLCodeGenerator.h", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLGLSLCodeGenerator.h", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLMetalCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLMetalCodeGenerator.h", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLPipelineStageCodeGenerator.h", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLSPIRVCodeGenerator.h", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLSPIRVtoHLSL.cpp", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLSPIRVtoHLSL.h", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLVMCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/codegen/SkSLVMCodeGenerator.h", - "//third_party/$skia_subdir/src/sksl/dsl/DSLBlock.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLCase.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLCore.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLExpression.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLFunction.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLLayout.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLStatement.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLSymbols.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLType.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/DSLVar.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/priv/DSLFPs.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/priv/DSLFPs.h", - "//third_party/$skia_subdir/src/sksl/dsl/priv/DSLWriter.cpp", - "//third_party/$skia_subdir/src/sksl/dsl/priv/DSLWriter.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLBinaryExpression.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLBinaryExpression.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLBlock.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLBlock.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLChildCall.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLChildCall.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructor.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructor.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorArray.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorArray.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorArrayCast.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorArrayCast.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorCompound.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorCompound.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorCompoundCast.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorCompoundCast.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorDiagonalMatrix.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorDiagonalMatrix.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorMatrixResize.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorMatrixResize.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorScalarCast.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorScalarCast.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorSplat.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorSplat.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorStruct.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLConstructorStruct.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLDoStatement.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLDoStatement.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLExpressionStatement.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLExpressionStatement.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFieldAccess.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFieldAccess.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLForStatement.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLForStatement.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFunctionCall.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFunctionCall.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFunctionDeclaration.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFunctionDeclaration.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFunctionDefinition.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLFunctionDefinition.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLIfStatement.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLIfStatement.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLIndexExpression.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLIndexExpression.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLModifiers.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLPostfixExpression.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLPostfixExpression.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLPrefixExpression.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLPrefixExpression.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSetting.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSetting.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSwitchStatement.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSwitchStatement.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSwizzle.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSwizzle.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSymbolTable.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSymbolTable.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLTernaryExpression.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLTernaryExpression.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLType.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLType.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLTypeReference.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLTypeReference.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLVarDeclarations.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLVarDeclarations.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLVariable.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLVariable.h", - "//third_party/$skia_subdir/src/sksl/ir/SkSLVariableReference.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLVariableReference.h", - "//third_party/$skia_subdir/src/sksl/transform/SkSLBuiltinVariableScanner.cpp", - "//third_party/$skia_subdir/src/sksl/transform/SkSLEliminateDeadFunctions.cpp", - "//third_party/$skia_subdir/src/sksl/transform/SkSLEliminateDeadGlobalVariables.cpp", - "//third_party/$skia_subdir/src/sksl/transform/SkSLEliminateDeadLocalVariables.cpp", - "//third_party/$skia_subdir/src/sksl/transform/SkSLEliminateUnreachableCode.cpp", - "//third_party/$skia_subdir/src/sksl/transform/SkSLTransform.h", - ] -} else { - sksl_sources = [ - "//third_party/$skia_subdir/src/sksl/SkSLASTNode.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLByteCode.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLCFGGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLCPPCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLCPPUniformCTypes.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLCompiler.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLGLSLCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLHCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLIRGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLLexer.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLMetalCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLOutputStream.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLParser.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLPipelineStageCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLSPIRVCodeGenerator.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLSectionAndParameterHelper.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLString.cpp", - "//third_party/$skia_subdir/src/sksl/SkSLUtil.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSetting.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLSymbolTable.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLType.cpp", - "//third_party/$skia_subdir/src/sksl/ir/SkSLVariableReference.cpp", - ] - - # Exclude unused skia sksl files - sksl_sources -= - [ "//third_party/$skia_subdir/src/sksl/SkSLMetalCodeGenerator.cpp" ] -} +sksl_sources = [ + "//third_party/skia/include/sksl/DSLBlock.h", + "//third_party/skia/include/sksl/DSLCase.h", + "//third_party/skia/include/sksl/DSLCore.h", + "//third_party/skia/include/sksl/DSLExpression.h", + "//third_party/skia/include/sksl/DSLFunction.h", + "//third_party/skia/include/sksl/DSLLayout.h", + "//third_party/skia/include/sksl/DSLStatement.h", + "//third_party/skia/include/sksl/DSLSymbols.h", + "//third_party/skia/include/sksl/DSLType.h", + "//third_party/skia/include/sksl/DSLVar.h", + "//third_party/skia/src/sksl/SkSLAnalysis.cpp", + "//third_party/skia/src/sksl/SkSLAnalysis.h", + "//third_party/skia/src/sksl/SkSLBuiltinTypes.cpp", + "//third_party/skia/src/sksl/SkSLBuiltinTypes.h", + "//third_party/skia/src/sksl/SkSLCompiler.cpp", + "//third_party/skia/src/sksl/SkSLCompiler.h", + "//third_party/skia/src/sksl/SkSLConstantFolder.cpp", + "//third_party/skia/src/sksl/SkSLConstantFolder.h", + "//third_party/skia/src/sksl/SkSLContext.cpp", + "//third_party/skia/src/sksl/SkSLContext.h", + "//third_party/skia/src/sksl/SkSLDSLParser.cpp", + "//third_party/skia/src/sksl/SkSLDSLParser.h", + "//third_party/skia/src/sksl/SkSLErrorReporter.cpp", + "//third_party/skia/src/sksl/SkSLInliner.cpp", + "//third_party/skia/src/sksl/SkSLInliner.h", + "//third_party/skia/src/sksl/SkSLIntrinsicMap.cpp", + "//third_party/skia/src/sksl/SkSLIntrinsicMap.h", + "//third_party/skia/src/sksl/SkSLLexer.cpp", + "//third_party/skia/src/sksl/SkSLLexer.h", + "//third_party/skia/src/sksl/SkSLMangler.cpp", + "//third_party/skia/src/sksl/SkSLMangler.h", + "//third_party/skia/src/sksl/SkSLOperators.cpp", + "//third_party/skia/src/sksl/SkSLOperators.h", + "//third_party/skia/src/sksl/SkSLOutputStream.cpp", + "//third_party/skia/src/sksl/SkSLOutputStream.h", + "//third_party/skia/src/sksl/SkSLPool.cpp", + "//third_party/skia/src/sksl/SkSLPool.h", + "//third_party/skia/src/sksl/SkSLRehydrator.cpp", + "//third_party/skia/src/sksl/SkSLRehydrator.h", + "//third_party/skia/src/sksl/SkSLSampleUsage.cpp", + "//third_party/skia/src/sksl/SkSLString.cpp", + "//third_party/skia/src/sksl/SkSLThreadContext.cpp", + "//third_party/skia/src/sksl/SkSLThreadContext.h", + "//third_party/skia/src/sksl/SkSLUtil.cpp", + "//third_party/skia/src/sksl/SkSLUtil.h", + "//third_party/skia/src/sksl/analysis/SkSLCanExitWithoutReturningValue.cpp", + "//third_party/skia/src/sksl/analysis/SkSLCheckProgramUnrolledSize.cpp", + "//third_party/skia/src/sksl/analysis/SkSLGetLoopUnrollInfo.cpp", + "//third_party/skia/src/sksl/analysis/SkSLIsConstantExpression.cpp", + "//third_party/skia/src/sksl/analysis/SkSLProgramUsage.cpp", + "//third_party/skia/src/sksl/analysis/SkSLSwitchCaseContainsExit.cpp", + "//third_party/skia/src/sksl/codegen/SkSLCodeGenerator.h", + "//third_party/skia/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp", + "//third_party/skia/src/sksl/codegen/SkSLGLSLCodeGenerator.h", + "//third_party/skia/src/sksl/codegen/SkSLMetalCodeGenerator.cpp", + "//third_party/skia/src/sksl/codegen/SkSLMetalCodeGenerator.h", + "//third_party/skia/src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp", + "//third_party/skia/src/sksl/codegen/SkSLPipelineStageCodeGenerator.h", + "//third_party/skia/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp", + "//third_party/skia/src/sksl/codegen/SkSLSPIRVCodeGenerator.h", + "//third_party/skia/src/sksl/codegen/SkSLSPIRVtoHLSL.cpp", + "//third_party/skia/src/sksl/codegen/SkSLSPIRVtoHLSL.h", + "//third_party/skia/src/sksl/codegen/SkSLVMCodeGenerator.cpp", + "//third_party/skia/src/sksl/codegen/SkSLVMCodeGenerator.h", + "//third_party/skia/src/sksl/dsl/DSLBlock.cpp", + "//third_party/skia/src/sksl/dsl/DSLCase.cpp", + "//third_party/skia/src/sksl/dsl/DSLCore.cpp", + "//third_party/skia/src/sksl/dsl/DSLExpression.cpp", + "//third_party/skia/src/sksl/dsl/DSLFunction.cpp", + "//third_party/skia/src/sksl/dsl/DSLLayout.cpp", + "//third_party/skia/src/sksl/dsl/DSLStatement.cpp", + "//third_party/skia/src/sksl/dsl/DSLSymbols.cpp", + "//third_party/skia/src/sksl/dsl/DSLType.cpp", + "//third_party/skia/src/sksl/dsl/DSLVar.cpp", + "//third_party/skia/src/sksl/dsl/priv/DSLFPs.cpp", + "//third_party/skia/src/sksl/dsl/priv/DSLFPs.h", + "//third_party/skia/src/sksl/dsl/priv/DSLWriter.cpp", + "//third_party/skia/src/sksl/dsl/priv/DSLWriter.h", + "//third_party/skia/src/sksl/ir/SkSLBinaryExpression.cpp", + "//third_party/skia/src/sksl/ir/SkSLBinaryExpression.h", + "//third_party/skia/src/sksl/ir/SkSLBlock.cpp", + "//third_party/skia/src/sksl/ir/SkSLBlock.h", + "//third_party/skia/src/sksl/ir/SkSLChildCall.cpp", + "//third_party/skia/src/sksl/ir/SkSLChildCall.h", + "//third_party/skia/src/sksl/ir/SkSLConstructor.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructor.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorArray.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorArray.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorArrayCast.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorArrayCast.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorCompound.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorCompound.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorCompoundCast.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorCompoundCast.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorDiagonalMatrix.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorDiagonalMatrix.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorMatrixResize.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorMatrixResize.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorScalarCast.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorScalarCast.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorSplat.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorSplat.h", + "//third_party/skia/src/sksl/ir/SkSLConstructorStruct.cpp", + "//third_party/skia/src/sksl/ir/SkSLConstructorStruct.h", + "//third_party/skia/src/sksl/ir/SkSLDoStatement.cpp", + "//third_party/skia/src/sksl/ir/SkSLDoStatement.h", + "//third_party/skia/src/sksl/ir/SkSLExpressionStatement.cpp", + "//third_party/skia/src/sksl/ir/SkSLExpressionStatement.h", + "//third_party/skia/src/sksl/ir/SkSLFieldAccess.cpp", + "//third_party/skia/src/sksl/ir/SkSLFieldAccess.h", + "//third_party/skia/src/sksl/ir/SkSLForStatement.cpp", + "//third_party/skia/src/sksl/ir/SkSLForStatement.h", + "//third_party/skia/src/sksl/ir/SkSLFunctionCall.cpp", + "//third_party/skia/src/sksl/ir/SkSLFunctionCall.h", + "//third_party/skia/src/sksl/ir/SkSLFunctionDeclaration.cpp", + "//third_party/skia/src/sksl/ir/SkSLFunctionDeclaration.h", + "//third_party/skia/src/sksl/ir/SkSLFunctionDefinition.cpp", + "//third_party/skia/src/sksl/ir/SkSLFunctionDefinition.h", + "//third_party/skia/src/sksl/ir/SkSLIfStatement.cpp", + "//third_party/skia/src/sksl/ir/SkSLIfStatement.h", + "//third_party/skia/src/sksl/ir/SkSLIndexExpression.cpp", + "//third_party/skia/src/sksl/ir/SkSLIndexExpression.h", + "//third_party/skia/src/sksl/ir/SkSLModifiers.cpp", + "//third_party/skia/src/sksl/ir/SkSLPostfixExpression.cpp", + "//third_party/skia/src/sksl/ir/SkSLPostfixExpression.h", + "//third_party/skia/src/sksl/ir/SkSLPrefixExpression.cpp", + "//third_party/skia/src/sksl/ir/SkSLPrefixExpression.h", + "//third_party/skia/src/sksl/ir/SkSLSetting.cpp", + "//third_party/skia/src/sksl/ir/SkSLSetting.h", + "//third_party/skia/src/sksl/ir/SkSLSwitchStatement.cpp", + "//third_party/skia/src/sksl/ir/SkSLSwitchStatement.h", + "//third_party/skia/src/sksl/ir/SkSLSwizzle.cpp", + "//third_party/skia/src/sksl/ir/SkSLSwizzle.h", + "//third_party/skia/src/sksl/ir/SkSLSymbolTable.cpp", + "//third_party/skia/src/sksl/ir/SkSLSymbolTable.h", + "//third_party/skia/src/sksl/ir/SkSLTernaryExpression.cpp", + "//third_party/skia/src/sksl/ir/SkSLTernaryExpression.h", + "//third_party/skia/src/sksl/ir/SkSLType.cpp", + "//third_party/skia/src/sksl/ir/SkSLType.h", + "//third_party/skia/src/sksl/ir/SkSLTypeReference.cpp", + "//third_party/skia/src/sksl/ir/SkSLTypeReference.h", + "//third_party/skia/src/sksl/ir/SkSLVarDeclarations.cpp", + "//third_party/skia/src/sksl/ir/SkSLVarDeclarations.h", + "//third_party/skia/src/sksl/ir/SkSLVariable.cpp", + "//third_party/skia/src/sksl/ir/SkSLVariable.h", + "//third_party/skia/src/sksl/ir/SkSLVariableReference.cpp", + "//third_party/skia/src/sksl/ir/SkSLVariableReference.h", + "//third_party/skia/src/sksl/transform/SkSLBuiltinVariableScanner.cpp", + "//third_party/skia/src/sksl/transform/SkSLEliminateDeadFunctions.cpp", + "//third_party/skia/src/sksl/transform/SkSLEliminateDeadGlobalVariables.cpp", + "//third_party/skia/src/sksl/transform/SkSLEliminateDeadLocalVariables.cpp", + "//third_party/skia/src/sksl/transform/SkSLEliminateUnreachableCode.cpp", + "//third_party/skia/src/sksl/transform/SkSLTransform.h", +] diff --git a/cobalt/renderer/rasterizer/skia/skia/skia_template.gni b/cobalt/renderer/rasterizer/skia/skia/skia_template.gni index 7ffe94435033..7a58e3dbb880 100644 --- a/cobalt/renderer/rasterizer/skia/skia/skia_template.gni +++ b/cobalt/renderer/rasterizer/skia/skia/skia_template.gni @@ -15,8 +15,6 @@ # This file handles the removal of platform-specific files from the # Skia build. -import("//cobalt/renderer/rasterizer/skia/skia/skia_next.gni") - template("skia_common") { # This list will contain all defines that also need to be exported to # dependent components. @@ -59,9 +57,9 @@ template("skia_common") { forward_variables_from(invoker, "*", [ "configs" ]) if (defined(include_dirs)) { - include_dirs += [ "//third_party/$skia_subdir" ] + include_dirs += [ "//third_party/skia" ] } else { - include_dirs = [ "//third_party/$skia_subdir" ] + include_dirs = [ "//third_party/skia" ] } if (!defined(defines)) { diff --git a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc index 918d040d83e0..554ca03c7a6d 100644 --- a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc +++ b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc @@ -266,12 +266,10 @@ sk_sp SkFontMgr_Cobalt::onMakeFromData(sk_sp data, face_index); } -#ifdef USE_SKIA_NEXT sk_sp SkFontMgr_Cobalt::onMakeFromStreamArgs( std::unique_ptr stream, const SkFontArguments& args) const { return this->makeFromStream(std::move(stream), args.getCollectionIndex()); } -#endif sk_sp SkFontMgr_Cobalt::onMakeFromStreamIndex( std::unique_ptr stream, int face_index) const { diff --git a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.h b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.h index 0cb99d57c9c1..4fecd901f316 100644 --- a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.h +++ b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.h @@ -101,11 +101,9 @@ class SkFontMgr_Cobalt : public SkFontMgr { sk_sp onMakeFromData(sk_sp data, int face_index) const override; -#ifdef USE_SKIA_NEXT // NOTE: This returns NULL if the typeface cannot be created. sk_sp onMakeFromStreamArgs(std::unique_ptr, const SkFontArguments&) const override; -#endif // NOTE: This returns NULL if the typeface cannot be created. sk_sp onMakeFromStreamIndex(std::unique_ptr stream, diff --git a/cobalt/renderer/render_tree_pixel_tester.cc b/cobalt/renderer/render_tree_pixel_tester.cc index 4ffc3386fbe4..cdf61c3e073a 100644 --- a/cobalt/renderer/render_tree_pixel_tester.cc +++ b/cobalt/renderer/render_tree_pixel_tester.cc @@ -30,11 +30,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPixelRef.h" -#ifdef USE_SKIA_NEXT #include "third_party/skia/include/effects/SkImageFilters.h" -#else -#include "third_party/skia/include/effects/SkBlurImageFilter.h" -#endif // Avoid overriding of Windows' CreateDirectory macro. #undef CreateDirectory @@ -137,24 +133,14 @@ SkBitmap BlurBitmap(const SkBitmap& bitmap, float sigma) { DCHECK(blurred_bitmap_allocated); SkPaint paint; -#ifdef USE_SKIA_NEXT sk_sp blur_filter(SkImageFilters::Blur(sigma, sigma, nullptr)); -#else - sk_sp blur_filter( - SkBlurImageFilter::Make(sigma, sigma, nullptr)); -#endif paint.setImageFilter(blur_filter); SkCanvas canvas(blurred_bitmap); canvas.clear(SkColorSetARGB(0, 0, 0, 0)); -#ifdef USE_SKIA_NEXT premul_alpha_bitmap.setImmutable(); sk_sp image = SkImage::MakeFromBitmap(premul_alpha_bitmap); canvas.drawImage(image, 0, 0, SkSamplingOptions(), &paint); -#else - canvas.drawBitmap(premul_alpha_bitmap, 0, 0, &paint); -#endif - return blurred_bitmap; } diff --git a/third_party/skia/include/core/SkTypes.h b/third_party/skia/include/core/SkTypes.h index 45b5a009aa2a..241511f87ac5 100644 --- a/third_party/skia/include/core/SkTypes.h +++ b/third_party/skia/include/core/SkTypes.h @@ -8,11 +8,6 @@ #ifndef SkTypes_DEFINED #define SkTypes_DEFINED -#ifndef USE_SKIA_NEXT -#error Including a skia_next header in a Skia build. \ -Check include paths order and use_skia_next argument usage in build configs. -#endif - /** \file SkTypes.h */