|
39 | 39 | sk_sp<SkSurface> CreateSurfaceFromMetalTexture(GrDirectContext* context, |
40 | 40 | id<MTLTexture> texture, |
41 | 41 | GrSurfaceOrigin origin, |
42 | | - MsaaSampleCount sample_cnt, |
43 | 42 | SkColorType color_type, |
44 | 43 | sk_sp<SkColorSpace> color_space, |
45 | 44 | const SkSurfaceProps* props, |
|
49 | 48 | info.fTexture.reset([texture retain]); |
50 | 49 | GrBackendTexture backend_texture = |
51 | 50 | GrBackendTextures::MakeMtl(texture.width, texture.height, skgpu::Mipmapped::kNo, info); |
52 | | - return SkSurfaces::WrapBackendTexture( |
53 | | - context, backend_texture, origin, static_cast<int>(sample_cnt), color_type, |
54 | | - std::move(color_space), props, release_proc, release_context); |
| 51 | + return SkSurfaces::WrapBackendTexture(context, backend_texture, origin, 1, color_type, |
| 52 | + std::move(color_space), props, release_proc, |
| 53 | + release_context); |
55 | 54 | } |
56 | 55 | } // namespace |
57 | 56 |
|
58 | 57 | GPUSurfaceMetalSkia::GPUSurfaceMetalSkia(GPUSurfaceMetalDelegate* delegate, |
59 | 58 | sk_sp<GrDirectContext> context, |
60 | | - MsaaSampleCount msaa_samples, |
61 | 59 | bool render_to_surface) |
62 | 60 | : delegate_(delegate), |
63 | 61 | render_target_type_(delegate->GetRenderTargetType()), |
64 | 62 | context_(std::move(context)), |
65 | | - msaa_samples_(msaa_samples), |
66 | 63 | render_to_surface_(render_to_surface) { |
67 | 64 | // If this preference is explicitly set, we allow for disabling partial repaint. |
68 | 65 | NSNumber* disablePartialRepaint = |
|
141 | 138 |
|
142 | 139 | auto surface = CreateSurfaceFromMetalTexture(context_.get(), drawable.get().texture, |
143 | 140 | kTopLeft_GrSurfaceOrigin, // origin |
144 | | - msaa_samples_, // sample count |
145 | 141 | kBGRA_8888_SkColorType, // color type |
146 | 142 | nullptr, // colorspace |
147 | 143 | nullptr, // surface properties |
|
213 | 209 | } |
214 | 210 |
|
215 | 211 | sk_sp<SkSurface> surface = CreateSurfaceFromMetalTexture( |
216 | | - context_.get(), mtl_texture, kTopLeft_GrSurfaceOrigin, msaa_samples_, kBGRA_8888_SkColorType, |
217 | | - nullptr, nullptr, static_cast<SkSurfaces::TextureReleaseProc>(texture.destruction_callback), |
| 212 | + context_.get(), mtl_texture, kTopLeft_GrSurfaceOrigin, kBGRA_8888_SkColorType, nullptr, |
| 213 | + nullptr, static_cast<SkSurfaces::TextureReleaseProc>(texture.destruction_callback), |
218 | 214 | texture.destruction_context); |
219 | 215 |
|
220 | 216 | if (!surface) { |
|
0 commit comments