diff --git a/display_list/display_list_benchmarks_gl.cc b/display_list/display_list_benchmarks_gl.cc index 256dcfd34b77f..a86a27dbd48e9 100644 --- a/display_list/display_list_benchmarks_gl.cc +++ b/display_list/display_list_benchmarks_gl.cc @@ -19,7 +19,7 @@ void OpenGLCanvasProvider::InitializeSurface(const size_t width, const auto image_info = SkImageInfo::MakeN32Premul(surface_size_); surface_ = SkSurface::MakeRenderTarget( - gl_surface_->GetGrContext().get(), SkBudgeted::kNo, image_info, 1, + gl_surface_->GetGrContext().get(), skgpu::Budgeted::kNo, image_info, 1, kTopLeft_GrSurfaceOrigin, nullptr, false); surface_->getCanvas()->clear(SK_ColorTRANSPARENT); } @@ -38,7 +38,7 @@ sk_sp OpenGLCanvasProvider::MakeOffscreenSurface( const auto image_info = SkImageInfo::MakeN32Premul(surface_size_); auto offscreen_surface = SkSurface::MakeRenderTarget( - gl_surface_->GetGrContext().get(), SkBudgeted::kNo, image_info, 1, + gl_surface_->GetGrContext().get(), skgpu::Budgeted::kNo, image_info, 1, kTopLeft_GrSurfaceOrigin, nullptr, false); offscreen_surface->getCanvas()->clear(SK_ColorTRANSPARENT); diff --git a/flow/layers/offscreen_surface.cc b/flow/layers/offscreen_surface.cc index cb29360e576ad..95516098603a9 100644 --- a/flow/layers/offscreen_surface.cc +++ b/flow/layers/offscreen_surface.cc @@ -21,8 +21,8 @@ static sk_sp CreateSnapshotSurface(GrDirectContext* surface_context, // There is a rendering surface that may contain textures that are going to // be referenced in the layer tree about to be drawn. return SkSurface::MakeRenderTarget( - reinterpret_cast(surface_context), SkBudgeted::kNo, - image_info); + reinterpret_cast(surface_context), + skgpu::Budgeted::kNo, image_info); } // There is no rendering surface, assume no GPU textures are present and diff --git a/flow/raster_cache.cc b/flow/raster_cache.cc index 31f73f5d330a6..9eb420f3b7a94 100644 --- a/flow/raster_cache.cc +++ b/flow/raster_cache.cc @@ -63,9 +63,10 @@ std::unique_ptr RasterCache::Rasterize( sk_ref_sp(context.dst_color_space)); sk_sp surface = - context.gr_context ? SkSurface::MakeRenderTarget( - context.gr_context, SkBudgeted::kYes, image_info) - : SkSurface::MakeRaster(image_info); + context.gr_context + ? SkSurface::MakeRenderTarget(context.gr_context, + skgpu::Budgeted::kYes, image_info) + : SkSurface::MakeRaster(image_info); if (!surface) { return nullptr; diff --git a/lib/ui/painting/image_encoding_impl.h b/lib/ui/painting/image_encoding_impl.h index 8708f38996e5d..b467fc82eeb5d 100644 --- a/lib/ui/painting/image_encoding_impl.h +++ b/lib/ui/painting/image_encoding_impl.h @@ -28,7 +28,7 @@ sk_sp ConvertToRasterUsingResourceContext( .SetIfFalse([&surface, &surface_info, resource_context] { if (resource_context) { surface = SkSurface::MakeRenderTarget( - resource_context.get(), SkBudgeted::kNo, surface_info); + resource_context.get(), skgpu::Budgeted::kNo, surface_info); } else { surface = SkSurface::MakeRaster(surface_info); } diff --git a/shell/common/rasterizer_unittests.cc b/shell/common/rasterizer_unittests.cc index a6f7ab7159e5d..99333d0dd1cae 100644 --- a/shell/common/rasterizer_unittests.cc +++ b/shell/common/rasterizer_unittests.cc @@ -913,8 +913,8 @@ TEST(RasterizerTest, TeardownFreesResourceCache) { auto image_info = SkImageInfo::MakeN32Premul(500, 500, SkColorSpace::MakeSRGB()); - auto sk_surface = - SkSurface::MakeRenderTarget(context.get(), SkBudgeted::kYes, image_info); + auto sk_surface = SkSurface::MakeRenderTarget( + context.get(), skgpu::Budgeted::kYes, image_info); EXPECT_TRUE(sk_surface); SkPaint paint; diff --git a/shell/common/shell_test_platform_view_vulkan.cc b/shell/common/shell_test_platform_view_vulkan.cc index fa3267ef731da..051775ae9a58f 100644 --- a/shell/common/shell_test_platform_view_vulkan.cc +++ b/shell/common/shell_test_platform_view_vulkan.cc @@ -194,8 +194,8 @@ ShellTestPlatformViewVulkan::OffScreenSurface::AcquireFrame( const SkISize& size) { auto image_info = SkImageInfo::Make(size, SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kOpaque_SkAlphaType); - auto surface = SkSurface::MakeRenderTarget(context_.get(), SkBudgeted::kNo, - image_info, 0, nullptr); + auto surface = SkSurface::MakeRenderTarget( + context_.get(), skgpu::Budgeted::kNo, image_info, 0, nullptr); SurfaceFrame::SubmitCallback callback = [](const SurfaceFrame&, SkCanvas* canvas) -> bool { canvas->flush(); diff --git a/shell/common/snapshot_controller_skia.cc b/shell/common/snapshot_controller_skia.cc index 62b665cfb1a82..27b67008e417d 100644 --- a/shell/common/snapshot_controller_skia.cc +++ b/shell/common/snapshot_controller_skia.cc @@ -104,9 +104,9 @@ sk_sp SnapshotControllerSkia::DoMakeRasterSnapshot( // When there is an on screen surface, we need a render target // SkSurface because we want to access texture backed images. sk_sp sk_surface = - SkSurface::MakeRenderTarget(context, // context - SkBudgeted::kNo, // budgeted - image_info // image info + SkSurface::MakeRenderTarget(context, // context + skgpu::Budgeted::kNo, // budgeted + image_info // image info ); if (!sk_surface) { FML_LOG(ERROR) diff --git a/shell/platform/darwin/macos/framework/Source/FlutterEmbedderExternalTextureTest.mm b/shell/platform/darwin/macos/framework/Source/FlutterEmbedderExternalTextureTest.mm index c4c1f8f08410a..55a6ade04a6f6 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterEmbedderExternalTextureTest.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterEmbedderExternalTextureTest.mm @@ -75,7 +75,7 @@ - (CVPixelBufferRef)pixelBuffer { [[FlutterDarwinContextMetalSkia alloc] initWithDefaultMTLDevice]; SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); GrDirectContext* grContext = darwinContextMetal.mainContext.get(); - sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, SkBudgeted::kNo, info)); + sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, skgpu::Budgeted::kNo, info)); // Create a texture. MTLTextureDescriptor* textureDescriptor = [[MTLTextureDescriptor alloc] init]; @@ -133,7 +133,7 @@ - (CVPixelBufferRef)pixelBuffer { [[FlutterDarwinContextMetalSkia alloc] initWithDefaultMTLDevice]; SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); GrDirectContext* grContext = darwinContextMetal.mainContext.get(); - sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, SkBudgeted::kNo, info)); + sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, skgpu::Budgeted::kNo, info)); // Create a texture. TestExternalTexture* testExternalTexture = @@ -185,7 +185,7 @@ - (CVPixelBufferRef)pixelBuffer { [[FlutterDarwinContextMetalSkia alloc] initWithDefaultMTLDevice]; SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); GrDirectContext* grContext = darwinContextMetal.mainContext.get(); - sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, SkBudgeted::kNo, info)); + sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, skgpu::Budgeted::kNo, info)); // Create a texture. TestExternalTexture* testExternalTexture = @@ -239,7 +239,7 @@ - (CVPixelBufferRef)pixelBuffer { [[FlutterDarwinContextMetalSkia alloc] initWithDefaultMTLDevice]; SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); GrDirectContext* grContext = darwinContextMetal.mainContext.get(); - sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, SkBudgeted::kNo, info)); + sk_sp gpuSurface(SkSurface::MakeRenderTarget(grContext, skgpu::Budgeted::kNo, info)); // Create a texture. TestExternalTexture* testExternalTexture = diff --git a/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc b/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc index 8511864d5fc72..f4357b73b3acd 100644 --- a/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc +++ b/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc @@ -83,7 +83,7 @@ bool EmbedderTestBackingStoreProducer::CreateFramebuffer( auto surface = SkSurface::MakeRenderTarget( context_.get(), // context - SkBudgeted::kNo, // budgeted + skgpu::Budgeted::kNo, // budgeted image_info, // image info 1, // sample count kBottomLeft_GrSurfaceOrigin, // surface origin @@ -136,7 +136,7 @@ bool EmbedderTestBackingStoreProducer::CreateTexture( auto surface = SkSurface::MakeRenderTarget( context_.get(), // context - SkBudgeted::kNo, // budgeted + skgpu::Budgeted::kNo, // budgeted image_info, // image info 1, // sample count kBottomLeft_GrSurfaceOrigin, // surface origin diff --git a/shell/platform/embedder/tests/embedder_test_compositor_gl.cc b/shell/platform/embedder/tests/embedder_test_compositor_gl.cc index 35cdf42828a63..2b9d946628954 100644 --- a/shell/platform/embedder/tests/embedder_test_compositor_gl.cc +++ b/shell/platform/embedder/tests/embedder_test_compositor_gl.cc @@ -29,7 +29,7 @@ bool EmbedderTestCompositorGL::UpdateOffscrenComposition( auto surface = SkSurface::MakeRenderTarget(context_.get(), // context - SkBudgeted::kNo, // budgeted + skgpu::Budgeted::kNo, // budgeted image_info, // image info 1, // sample count kTopLeft_GrSurfaceOrigin, // surface origin diff --git a/shell/platform/embedder/tests/embedder_test_compositor_metal.cc b/shell/platform/embedder/tests/embedder_test_compositor_metal.cc index f92b7cc21e4d0..ab3ae36ae6809 100644 --- a/shell/platform/embedder/tests/embedder_test_compositor_metal.cc +++ b/shell/platform/embedder/tests/embedder_test_compositor_metal.cc @@ -29,7 +29,7 @@ bool EmbedderTestCompositorMetal::UpdateOffscrenComposition( auto surface = SkSurface::MakeRenderTarget(context_.get(), // context - SkBudgeted::kNo, // budgeted + skgpu::Budgeted::kNo, // budgeted image_info, // image info 1, // sample count kTopLeft_GrSurfaceOrigin, // surface origin diff --git a/shell/platform/embedder/tests/embedder_test_compositor_vulkan.cc b/shell/platform/embedder/tests/embedder_test_compositor_vulkan.cc index c0df97a5f606c..76ac5ddb94fa2 100644 --- a/shell/platform/embedder/tests/embedder_test_compositor_vulkan.cc +++ b/shell/platform/embedder/tests/embedder_test_compositor_vulkan.cc @@ -30,7 +30,7 @@ bool EmbedderTestCompositorVulkan::UpdateOffscrenComposition( sk_sp surface = SkSurface::MakeRenderTarget(context_.get(), // context - SkBudgeted::kNo, // budgeted + skgpu::Budgeted::kNo, // budgeted image_info, // image info 1, // sample count kTopLeft_GrSurfaceOrigin, // surface origin diff --git a/shell/platform/embedder/tests/embedder_unittests_util.cc b/shell/platform/embedder/tests/embedder_unittests_util.cc index d6e9236379280..474091922d931 100644 --- a/shell/platform/embedder/tests/embedder_unittests_util.cc +++ b/shell/platform/embedder/tests/embedder_unittests_util.cc @@ -19,7 +19,7 @@ sk_sp CreateRenderSurface(const FlutterLayer& layer, SkImageInfo::MakeN32Premul(layer.size.width, layer.size.height); auto surface = context ? SkSurface::MakeRenderTarget( context, // context - SkBudgeted::kNo, // budgeted + skgpu::Budgeted::kNo, // budgeted image_info, // image info 1, // sample count kTopLeft_GrSurfaceOrigin, // surface origin