Loading libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -73,9 +73,11 @@ bool SkiaOpenGLPipeline::draw(const Frame& frame, const SkRect& screenDirty, // setup surface for fbo0 GrGLFramebufferInfo fboInfo; fboInfo.fFBOID = 0; GrPixelConfig pixelConfig = wideColorGamut ? kRGBA_half_GrPixelConfig : kRGBA_8888_GrPixelConfig; GrBackendRenderTarget backendRT(frame.width(), frame.height(), 0, STENCIL_BUFFER_SIZE, kRGBA_8888_GrPixelConfig, fboInfo); pixelConfig, fboInfo); SkSurfaceProps props(0, kUnknown_SkPixelGeometry); Loading libs/hwui/pipeline/skia/SkiaOpenGLReadback.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,18 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4 externalTexture.fTarget = GL_TEXTURE_EXTERNAL_OES; externalTexture.fID = sourceTexId; GrBackendTexture backendTexture(imgWidth, imgHeight, kRGBA_8888_GrPixelConfig, externalTexture); GrPixelConfig pixelConfig; switch (bitmap->colorType()) { case kRGBA_F16_SkColorType: pixelConfig = kRGBA_half_GrPixelConfig; break; case kN32_SkColorType: default: pixelConfig = kRGBA_8888_GrPixelConfig; break; } GrBackendTexture backendTexture(imgWidth, imgHeight, pixelConfig, externalTexture); CopyResult copyResult = CopyResult::UnknownError; sk_sp<SkImage> image(SkImage::MakeFromAdoptedTexture(grContext.get(), backendTexture, Loading libs/hwui/pipeline/skia/SkiaPipeline.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,13 @@ bool SkiaPipeline::createOrUpdateLayer(RenderNode* node, const DamageAccumulator& damageAccumulator, bool wideColorGamut) { SkSurface* layer = node->getLayerSurface(); if (!layer || layer->width() != node->getWidth() || layer->height() != node->getHeight()) { SkImageInfo info = SkImageInfo::MakeN32Premul(node->getWidth(), node->getHeight()); SkImageInfo info; if (wideColorGamut) { info = SkImageInfo::Make(node->getWidth(), node->getHeight(), kRGBA_F16_SkColorType, kPremul_SkAlphaType); } else { info = SkImageInfo::MakeN32Premul(node->getWidth(), node->getHeight()); } SkSurfaceProps props(0, kUnknown_SkPixelGeometry); SkASSERT(mRenderThread.getGrContext() != nullptr); // TODO: Handle wide color gamut requests Loading Loading
libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -73,9 +73,11 @@ bool SkiaOpenGLPipeline::draw(const Frame& frame, const SkRect& screenDirty, // setup surface for fbo0 GrGLFramebufferInfo fboInfo; fboInfo.fFBOID = 0; GrPixelConfig pixelConfig = wideColorGamut ? kRGBA_half_GrPixelConfig : kRGBA_8888_GrPixelConfig; GrBackendRenderTarget backendRT(frame.width(), frame.height(), 0, STENCIL_BUFFER_SIZE, kRGBA_8888_GrPixelConfig, fboInfo); pixelConfig, fboInfo); SkSurfaceProps props(0, kUnknown_SkPixelGeometry); Loading
libs/hwui/pipeline/skia/SkiaOpenGLReadback.cpp +12 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,18 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4 externalTexture.fTarget = GL_TEXTURE_EXTERNAL_OES; externalTexture.fID = sourceTexId; GrBackendTexture backendTexture(imgWidth, imgHeight, kRGBA_8888_GrPixelConfig, externalTexture); GrPixelConfig pixelConfig; switch (bitmap->colorType()) { case kRGBA_F16_SkColorType: pixelConfig = kRGBA_half_GrPixelConfig; break; case kN32_SkColorType: default: pixelConfig = kRGBA_8888_GrPixelConfig; break; } GrBackendTexture backendTexture(imgWidth, imgHeight, pixelConfig, externalTexture); CopyResult copyResult = CopyResult::UnknownError; sk_sp<SkImage> image(SkImage::MakeFromAdoptedTexture(grContext.get(), backendTexture, Loading
libs/hwui/pipeline/skia/SkiaPipeline.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,13 @@ bool SkiaPipeline::createOrUpdateLayer(RenderNode* node, const DamageAccumulator& damageAccumulator, bool wideColorGamut) { SkSurface* layer = node->getLayerSurface(); if (!layer || layer->width() != node->getWidth() || layer->height() != node->getHeight()) { SkImageInfo info = SkImageInfo::MakeN32Premul(node->getWidth(), node->getHeight()); SkImageInfo info; if (wideColorGamut) { info = SkImageInfo::Make(node->getWidth(), node->getHeight(), kRGBA_F16_SkColorType, kPremul_SkAlphaType); } else { info = SkImageInfo::MakeN32Premul(node->getWidth(), node->getHeight()); } SkSurfaceProps props(0, kUnknown_SkPixelGeometry); SkASSERT(mRenderThread.getGrContext() != nullptr); // TODO: Handle wide color gamut requests Loading