Loading services/surfaceflinger/BufferLayer.cpp +1 −20 Original line number Diff line number Diff line Loading @@ -138,8 +138,6 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip, bool useIdentityTransform) { ATRACE_CALL(); CompositionInfo& compositionInfo = getBE().compositionInfo; if (CC_UNLIKELY(mActiveBuffer == 0)) { // the texture has not been created yet, this Layer has // in fact never been drawn into. This happens frequently with Loading Loading @@ -221,7 +219,6 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip, mTexture.setDimensions(mActiveBuffer->getWidth(), mActiveBuffer->getHeight()); mTexture.setFiltering(useFiltering); mTexture.setMatrix(textureMatrix); compositionInfo.re.texture = mTexture; engine.setupLayerTexturing(mTexture); } else { Loading @@ -231,23 +228,6 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip, engine.disableTexturing(); } void BufferLayer::drawNow(const RenderArea& renderArea, bool useIdentityTransform) { CompositionInfo& compositionInfo = getBE().compositionInfo; auto& engine(mFlinger->getRenderEngine()); draw(renderArea, useIdentityTransform); engine.setupLayerTexturing(compositionInfo.re.texture); engine.setupLayerBlending(compositionInfo.re.preMultipliedAlpha, compositionInfo.re.opaque, false, compositionInfo.re.color); engine.setSourceDataSpace(compositionInfo.hwc.dataspace); engine.setSourceY410BT2020(compositionInfo.re.Y410BT2020); engine.drawMesh(getBE().getMesh()); engine.disableBlending(); engine.disableTexturing(); engine.setSourceY410BT2020(false); } bool BufferLayer::isHdrY410() const { // pixel format is HDR Y410 masquerading as RGBA_1010102 return (mCurrentDataSpace == ui::Dataspace::BT2020_ITU_PQ && Loading Loading @@ -340,6 +320,7 @@ bool BufferLayer::onPreComposition(nsecs_t refreshStartTime) { bool BufferLayer::onPostComposition(const std::shared_ptr<FenceTime>& glDoneFence, const std::shared_ptr<FenceTime>& presentFence, const CompositorTiming& compositorTiming) { // mFrameLatencyNeeded is true when a new frame was latched for the // composition. if (!mFrameLatencyNeeded) return false; Loading services/surfaceflinger/BufferLayer.h +0 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ public: // onDraw - draws the surface. void onDraw(const RenderArea& renderArea, const Region& clip, bool useIdentityTransform) override; void drawNow(const RenderArea& renderArea, bool useIdentityTransform); bool isHdrY410() const override; Loading services/surfaceflinger/ColorLayer.cpp +8 −18 Original line number Diff line number Diff line Loading @@ -45,26 +45,16 @@ void ColorLayer::onDraw(const RenderArea& renderArea, const Region& /* clip */, bool useIdentityTransform) { half4 color = getColor(); if (color.a > 0) { computeGeometry(renderArea, getBE().mMesh, useIdentityTransform); getBE().compositionInfo.re.preMultipliedAlpha = getPremultipledAlpha(); getBE().compositionInfo.re.opaque = false; getBE().compositionInfo.re.disableTexture = true; getBE().compositionInfo.re.color = color; } } void ColorLayer::drawNow(const RenderArea& renderArea, bool useIdentityTransform) { CompositionInfo& compositionInfo = getBE().compositionInfo; Mesh mesh(Mesh::TRIANGLE_FAN, 4, 2); computeGeometry(renderArea, mesh, useIdentityTransform); auto& engine(mFlinger->getRenderEngine()); draw(renderArea, useIdentityTransform); engine.setupLayerBlending(compositionInfo.re.preMultipliedAlpha, compositionInfo.re.opaque, compositionInfo.re.disableTexture, compositionInfo.re.color); engine.setSourceDataSpace(compositionInfo.hwc.dataspace); engine.drawMesh(getBE().getMesh()); engine.setupLayerBlending(getPremultipledAlpha(), false /* opaque */, true /* disableTexture */, color); engine.setSourceDataSpace(mCurrentDataSpace); engine.drawMesh(mesh); engine.disableBlending(); } } bool ColorLayer::isVisible() const { return !isHiddenByPolicy() && getAlpha() > 0.0f; Loading services/surfaceflinger/ColorLayer.h +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ public: virtual const char* getTypeId() const { return "ColorLayer"; } virtual void onDraw(const RenderArea& renderArea, const Region& clip, bool useIdentityTransform); void drawNow(const RenderArea&, bool); bool isVisible() const override; void setPerFrameData(const sp<const DisplayDevice>& display) override; Loading services/surfaceflinger/ContainerLayer.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -30,8 +30,6 @@ ContainerLayer::ContainerLayer(SurfaceFlinger* flinger, const sp<Client>& client void ContainerLayer::onDraw(const RenderArea&, const Region& /* clip */, bool) {} void ContainerLayer::drawNow(const RenderArea&, bool) {} bool ContainerLayer::isVisible() const { return !isHiddenByPolicy(); } Loading Loading
services/surfaceflinger/BufferLayer.cpp +1 −20 Original line number Diff line number Diff line Loading @@ -138,8 +138,6 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip, bool useIdentityTransform) { ATRACE_CALL(); CompositionInfo& compositionInfo = getBE().compositionInfo; if (CC_UNLIKELY(mActiveBuffer == 0)) { // the texture has not been created yet, this Layer has // in fact never been drawn into. This happens frequently with Loading Loading @@ -221,7 +219,6 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip, mTexture.setDimensions(mActiveBuffer->getWidth(), mActiveBuffer->getHeight()); mTexture.setFiltering(useFiltering); mTexture.setMatrix(textureMatrix); compositionInfo.re.texture = mTexture; engine.setupLayerTexturing(mTexture); } else { Loading @@ -231,23 +228,6 @@ void BufferLayer::onDraw(const RenderArea& renderArea, const Region& clip, engine.disableTexturing(); } void BufferLayer::drawNow(const RenderArea& renderArea, bool useIdentityTransform) { CompositionInfo& compositionInfo = getBE().compositionInfo; auto& engine(mFlinger->getRenderEngine()); draw(renderArea, useIdentityTransform); engine.setupLayerTexturing(compositionInfo.re.texture); engine.setupLayerBlending(compositionInfo.re.preMultipliedAlpha, compositionInfo.re.opaque, false, compositionInfo.re.color); engine.setSourceDataSpace(compositionInfo.hwc.dataspace); engine.setSourceY410BT2020(compositionInfo.re.Y410BT2020); engine.drawMesh(getBE().getMesh()); engine.disableBlending(); engine.disableTexturing(); engine.setSourceY410BT2020(false); } bool BufferLayer::isHdrY410() const { // pixel format is HDR Y410 masquerading as RGBA_1010102 return (mCurrentDataSpace == ui::Dataspace::BT2020_ITU_PQ && Loading Loading @@ -340,6 +320,7 @@ bool BufferLayer::onPreComposition(nsecs_t refreshStartTime) { bool BufferLayer::onPostComposition(const std::shared_ptr<FenceTime>& glDoneFence, const std::shared_ptr<FenceTime>& presentFence, const CompositorTiming& compositorTiming) { // mFrameLatencyNeeded is true when a new frame was latched for the // composition. if (!mFrameLatencyNeeded) return false; Loading
services/surfaceflinger/BufferLayer.h +0 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ public: // onDraw - draws the surface. void onDraw(const RenderArea& renderArea, const Region& clip, bool useIdentityTransform) override; void drawNow(const RenderArea& renderArea, bool useIdentityTransform); bool isHdrY410() const override; Loading
services/surfaceflinger/ColorLayer.cpp +8 −18 Original line number Diff line number Diff line Loading @@ -45,26 +45,16 @@ void ColorLayer::onDraw(const RenderArea& renderArea, const Region& /* clip */, bool useIdentityTransform) { half4 color = getColor(); if (color.a > 0) { computeGeometry(renderArea, getBE().mMesh, useIdentityTransform); getBE().compositionInfo.re.preMultipliedAlpha = getPremultipledAlpha(); getBE().compositionInfo.re.opaque = false; getBE().compositionInfo.re.disableTexture = true; getBE().compositionInfo.re.color = color; } } void ColorLayer::drawNow(const RenderArea& renderArea, bool useIdentityTransform) { CompositionInfo& compositionInfo = getBE().compositionInfo; Mesh mesh(Mesh::TRIANGLE_FAN, 4, 2); computeGeometry(renderArea, mesh, useIdentityTransform); auto& engine(mFlinger->getRenderEngine()); draw(renderArea, useIdentityTransform); engine.setupLayerBlending(compositionInfo.re.preMultipliedAlpha, compositionInfo.re.opaque, compositionInfo.re.disableTexture, compositionInfo.re.color); engine.setSourceDataSpace(compositionInfo.hwc.dataspace); engine.drawMesh(getBE().getMesh()); engine.setupLayerBlending(getPremultipledAlpha(), false /* opaque */, true /* disableTexture */, color); engine.setSourceDataSpace(mCurrentDataSpace); engine.drawMesh(mesh); engine.disableBlending(); } } bool ColorLayer::isVisible() const { return !isHiddenByPolicy() && getAlpha() > 0.0f; Loading
services/surfaceflinger/ColorLayer.h +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ public: virtual const char* getTypeId() const { return "ColorLayer"; } virtual void onDraw(const RenderArea& renderArea, const Region& clip, bool useIdentityTransform); void drawNow(const RenderArea&, bool); bool isVisible() const override; void setPerFrameData(const sp<const DisplayDevice>& display) override; Loading
services/surfaceflinger/ContainerLayer.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -30,8 +30,6 @@ ContainerLayer::ContainerLayer(SurfaceFlinger* flinger, const sp<Client>& client void ContainerLayer::onDraw(const RenderArea&, const Region& /* clip */, bool) {} void ContainerLayer::drawNow(const RenderArea&, bool) {} bool ContainerLayer::isVisible() const { return !isHiddenByPolicy(); } Loading