Loading libs/hwui/DeviceInfo.cpp +0 −13 Original line number Diff line number Diff line Loading @@ -61,18 +61,6 @@ DisplayInfo QueryDisplayInfo() { return displayInfo; } void QueryCompositionPreference(ui::Dataspace* dataSpace, ui::PixelFormat* pixelFormat) { if (Properties::isolatedProcess) { *dataSpace = ui::Dataspace::V0_SRGB; *pixelFormat = ui::PixelFormat::RGBA_8888; } status_t status = SurfaceComposerClient::getCompositionPreference(dataSpace, pixelFormat); LOG_ALWAYS_FATAL_IF(status, "Failed to get composition preference, error %d", status); } DeviceInfo::DeviceInfo() { #if HWUI_NULL_GPU mMaxTextureSize = NULL_GPU_MAX_TEXTURE_SIZE; Loading @@ -80,7 +68,6 @@ DeviceInfo::DeviceInfo() { mMaxTextureSize = -1; #endif mDisplayInfo = QueryDisplayInfo(); QueryCompositionPreference(&mTargetDataSpace, &mTargetPixelFormat); } int DeviceInfo::maxTextureSize() const { Loading libs/hwui/DeviceInfo.h +0 −8 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #define DEVICEINFO_H #include <ui/DisplayInfo.h> #include <ui/GraphicTypes.h> #include "utils/Macros.h" Loading @@ -37,9 +36,6 @@ public: // this value is only valid after the GPU has been initialized and there is a valid graphics // context or if you are using the HWUI_NULL_GPU int maxTextureSize() const; ui::Dataspace getTargetDataSpace() const { return mTargetDataSpace; } ui::PixelFormat getTargetPixelFormat() const { return mTargetPixelFormat; } const DisplayInfo& displayInfo() const { return mDisplayInfo; } private: Loading @@ -50,10 +46,6 @@ private: int mMaxTextureSize; DisplayInfo mDisplayInfo; // TODO(lpy) Replace below with android_ prefix types. ui::Dataspace mTargetDataSpace; ui::PixelFormat mTargetPixelFormat; }; } /* namespace uirenderer */ Loading libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +6 −8 Original line number Diff line number Diff line Loading @@ -167,6 +167,12 @@ bool SkiaOpenGLPipeline::setSurface(Surface* surface, SwapBehavior swapBehavior, mEglSurface = mEglManager.createSurface(surface, colorMode); } if (colorMode == ColorMode::SRGB) { mSurfaceColorType = SkColorType::kN32_SkColorType; } else if (colorMode == ColorMode::WideColorGamut) { mSurfaceColorType = SkColorType::kRGBA_F16_SkColorType; } if (mEglSurface != EGL_NO_SURFACE) { const bool preserveBuffer = (swapBehavior != SwapBehavior::kSwap_discardBuffer); mBufferPreserved = mEglManager.setPreserveBuffer(mEglSurface, preserveBuffer); Loading @@ -184,14 +190,6 @@ bool SkiaOpenGLPipeline::isContextReady() { return CC_LIKELY(mEglManager.hasEglContext()); } SkColorType SkiaOpenGLPipeline::getSurfaceColorType() const { return mEglManager.getSurfaceColorType(); } sk_sp<SkColorSpace> SkiaOpenGLPipeline::getSurfaceColorSpace() { return mEglManager.getSurfaceColorSpace(); } void SkiaOpenGLPipeline::invokeFunctor(const RenderThread& thread, Functor* functor) { DrawGlInfo::Mode mode = DrawGlInfo::kModeProcessNoContext; if (thread.eglManager().hasEglContext()) { Loading libs/hwui/pipeline/skia/SkiaOpenGLPipeline.h +0 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,6 @@ public: void onStop() override; bool isSurfaceReady() override; bool isContextReady() override; SkColorType getSurfaceColorType() const override; sk_sp<SkColorSpace> getSurfaceColorSpace() override; static void invokeFunctor(const renderthread::RenderThread& thread, Functor* functor); Loading libs/hwui/pipeline/skia/SkiaPipeline.h +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ public: bool createOrUpdateLayer(RenderNode* node, const DamageAccumulator& damageAccumulator, ErrorHandler* errorHandler) override; SkColorType getSurfaceColorType() const { return mSurfaceColorType; } sk_sp<SkColorSpace> getSurfaceColorSpace() override { return mSurfaceColorSpace; } void renderFrame(const LayerUpdateQueue& layers, const SkRect& clip, const std::vector<sp<RenderNode>>& nodes, bool opaque, const Rect& contentDrawBounds, sk_sp<SkSurface> surface); Loading Loading @@ -106,6 +109,8 @@ protected: void dumpResourceCacheUsage() const; renderthread::RenderThread& mRenderThread; SkColorType mSurfaceColorType; sk_sp<SkColorSpace> mSurfaceColorSpace; private: void renderFrameImpl(const LayerUpdateQueue& layers, const SkRect& clip, Loading Loading
libs/hwui/DeviceInfo.cpp +0 −13 Original line number Diff line number Diff line Loading @@ -61,18 +61,6 @@ DisplayInfo QueryDisplayInfo() { return displayInfo; } void QueryCompositionPreference(ui::Dataspace* dataSpace, ui::PixelFormat* pixelFormat) { if (Properties::isolatedProcess) { *dataSpace = ui::Dataspace::V0_SRGB; *pixelFormat = ui::PixelFormat::RGBA_8888; } status_t status = SurfaceComposerClient::getCompositionPreference(dataSpace, pixelFormat); LOG_ALWAYS_FATAL_IF(status, "Failed to get composition preference, error %d", status); } DeviceInfo::DeviceInfo() { #if HWUI_NULL_GPU mMaxTextureSize = NULL_GPU_MAX_TEXTURE_SIZE; Loading @@ -80,7 +68,6 @@ DeviceInfo::DeviceInfo() { mMaxTextureSize = -1; #endif mDisplayInfo = QueryDisplayInfo(); QueryCompositionPreference(&mTargetDataSpace, &mTargetPixelFormat); } int DeviceInfo::maxTextureSize() const { Loading
libs/hwui/DeviceInfo.h +0 −8 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #define DEVICEINFO_H #include <ui/DisplayInfo.h> #include <ui/GraphicTypes.h> #include "utils/Macros.h" Loading @@ -37,9 +36,6 @@ public: // this value is only valid after the GPU has been initialized and there is a valid graphics // context or if you are using the HWUI_NULL_GPU int maxTextureSize() const; ui::Dataspace getTargetDataSpace() const { return mTargetDataSpace; } ui::PixelFormat getTargetPixelFormat() const { return mTargetPixelFormat; } const DisplayInfo& displayInfo() const { return mDisplayInfo; } private: Loading @@ -50,10 +46,6 @@ private: int mMaxTextureSize; DisplayInfo mDisplayInfo; // TODO(lpy) Replace below with android_ prefix types. ui::Dataspace mTargetDataSpace; ui::PixelFormat mTargetPixelFormat; }; } /* namespace uirenderer */ Loading
libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +6 −8 Original line number Diff line number Diff line Loading @@ -167,6 +167,12 @@ bool SkiaOpenGLPipeline::setSurface(Surface* surface, SwapBehavior swapBehavior, mEglSurface = mEglManager.createSurface(surface, colorMode); } if (colorMode == ColorMode::SRGB) { mSurfaceColorType = SkColorType::kN32_SkColorType; } else if (colorMode == ColorMode::WideColorGamut) { mSurfaceColorType = SkColorType::kRGBA_F16_SkColorType; } if (mEglSurface != EGL_NO_SURFACE) { const bool preserveBuffer = (swapBehavior != SwapBehavior::kSwap_discardBuffer); mBufferPreserved = mEglManager.setPreserveBuffer(mEglSurface, preserveBuffer); Loading @@ -184,14 +190,6 @@ bool SkiaOpenGLPipeline::isContextReady() { return CC_LIKELY(mEglManager.hasEglContext()); } SkColorType SkiaOpenGLPipeline::getSurfaceColorType() const { return mEglManager.getSurfaceColorType(); } sk_sp<SkColorSpace> SkiaOpenGLPipeline::getSurfaceColorSpace() { return mEglManager.getSurfaceColorSpace(); } void SkiaOpenGLPipeline::invokeFunctor(const RenderThread& thread, Functor* functor) { DrawGlInfo::Mode mode = DrawGlInfo::kModeProcessNoContext; if (thread.eglManager().hasEglContext()) { Loading
libs/hwui/pipeline/skia/SkiaOpenGLPipeline.h +0 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,6 @@ public: void onStop() override; bool isSurfaceReady() override; bool isContextReady() override; SkColorType getSurfaceColorType() const override; sk_sp<SkColorSpace> getSurfaceColorSpace() override; static void invokeFunctor(const renderthread::RenderThread& thread, Functor* functor); Loading
libs/hwui/pipeline/skia/SkiaPipeline.h +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ public: bool createOrUpdateLayer(RenderNode* node, const DamageAccumulator& damageAccumulator, ErrorHandler* errorHandler) override; SkColorType getSurfaceColorType() const { return mSurfaceColorType; } sk_sp<SkColorSpace> getSurfaceColorSpace() override { return mSurfaceColorSpace; } void renderFrame(const LayerUpdateQueue& layers, const SkRect& clip, const std::vector<sp<RenderNode>>& nodes, bool opaque, const Rect& contentDrawBounds, sk_sp<SkSurface> surface); Loading Loading @@ -106,6 +109,8 @@ protected: void dumpResourceCacheUsage() const; renderthread::RenderThread& mRenderThread; SkColorType mSurfaceColorType; sk_sp<SkColorSpace> mSurfaceColorSpace; private: void renderFrameImpl(const LayerUpdateQueue& layers, const SkRect& clip, Loading