OpenGL ES no longer uses different color type for surfaces
This commit is contained in:
parent
37c105bf5e
commit
bacca9ff68
1 changed files with 1 additions and 5 deletions
|
|
@ -252,11 +252,7 @@ void MainProgram::draw(SkCanvas* canvas, std::shared_ptr<World> worldToDraw, con
|
||||||
|
|
||||||
sk_sp<SkSurface> MainProgram::create_native_surface(Vector2i resolution, bool isMSAA) {
|
sk_sp<SkSurface> MainProgram::create_native_surface(Vector2i resolution, bool isMSAA) {
|
||||||
if(window.canCreateSurfaces) {
|
if(window.canCreateSurfaces) {
|
||||||
#ifdef USE_BACKEND_OPENGLES_3_0
|
|
||||||
SkImageInfo imgInfo = SkImageInfo::Make(resolution.x(), resolution.y(), kRGBA_8888_SkColorType, kPremul_SkAlphaType);
|
|
||||||
#else
|
|
||||||
SkImageInfo imgInfo = SkImageInfo::MakeN32Premul(resolution.x(), resolution.y());
|
SkImageInfo imgInfo = SkImageInfo::MakeN32Premul(resolution.x(), resolution.y());
|
||||||
#endif
|
|
||||||
SkSurfaceProps defaultProps;
|
SkSurfaceProps defaultProps;
|
||||||
#ifdef USE_SKIA_BACKEND_GRAPHITE
|
#ifdef USE_SKIA_BACKEND_GRAPHITE
|
||||||
auto surfaceToRet = SkSurfaces::RenderTarget(window.recorder(), imgInfo, skgpu::Mipmapped::kNo, isMSAA ? &window.defaultMSAASurfaceProps : &defaultProps);
|
auto surfaceToRet = SkSurfaces::RenderTarget(window.recorder(), imgInfo, skgpu::Mipmapped::kNo, isMSAA ? &window.defaultMSAASurfaceProps : &defaultProps);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue