Loading services/surfaceflinger/BufferLayer.cpp +7 −11 Original line number Diff line number Diff line Loading @@ -99,11 +99,9 @@ BufferLayer::~BufferLayer() { #endif } bool BufferLayer::isProtected() const { bool BufferLayer::isProtected() const { const sp<GraphicBuffer>& activeBuffer(mActiveBuffer); return (activeBuffer != 0) && (activeBuffer->getUsage() & GRALLOC_USAGE_PROTECTED); return (activeBuffer != 0) && (activeBuffer->getUsage() & GRALLOC_USAGE_PROTECTED); } bool BufferLayer::isVisible() const { Loading Loading @@ -605,8 +603,7 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& hw, } #endif bool BufferLayer::isOpaque(const Layer::State& s) const { bool BufferLayer::isOpaque(const Layer::State& s) const { // if we don't have a buffer or sidebandStream yet, we're translucent regardless of the // layer's opaque flag. if ((mSidebandStream == nullptr) && (mActiveBuffer == nullptr)) { Loading Loading @@ -730,8 +727,7 @@ bool BufferLayer::getOpacityForFormat(uint32_t format) { return true; } void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { const State& s(getDrawingState()); computeGeometry(renderArea, mMesh, useIdentityTransform); Loading services/surfaceflinger/BufferLayer.h +4 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ #pragma once #include "Layer.h" #include "Client.h" #include "Layer.h" #include "DisplayHardware/HWComposer.h" #include "DisplayHardware/HWComposerBufferCache.h" #include "FrameTracker.h" Loading Loading @@ -118,7 +118,8 @@ public: #ifdef USE_HWC2 void setPerFrameData(const sp<const DisplayDevice>& displayDevice); #else void setPerFrameData(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer); void setPerFrameData(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer); #endif bool isOpaque(const Layer::State& s) const override; Loading @@ -137,8 +138,7 @@ private: static bool getOpacityForFormat(uint32_t format); // drawing void drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const; void drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const; // Temporary - Used only for LEGACY camera mode. uint32_t getProducerStickyTransform() const; Loading services/surfaceflinger/ColorLayer.cpp +6 −8 Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ #undef LOG_TAG #define LOG_TAG "ColorLayer" #include <stdlib.h> #include <stdint.h> #include <stdlib.h> #include <sys/types.h> #include <utils/Errors.h> Loading @@ -28,17 +28,16 @@ #include <ui/GraphicBuffer.h> #include "ColorLayer.h" #include "SurfaceFlinger.h" #include "DisplayDevice.h" #include "RenderEngine/RenderEngine.h" #include "SurfaceFlinger.h" namespace android { // --------------------------------------------------------------------------- ColorLayer::ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags) ColorLayer::ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags) : Layer(flinger, client, name, w, h, flags) { // drawing state & current state are identical mDrawingState = mCurrentState; } Loading @@ -62,7 +61,6 @@ bool ColorLayer::isVisible() const { return !isHiddenByPolicy() && s.color.a; } // --------------------------------------------------------------------------- }; // namespace android services/surfaceflinger/ColorLayer.h +4 −4 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ namespace android { class ColorLayer : public Layer { public: ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags); ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags); virtual ~ColorLayer() = default; virtual const char* getTypeId() const { return "ColorLayer"; } Loading Loading
services/surfaceflinger/BufferLayer.cpp +7 −11 Original line number Diff line number Diff line Loading @@ -99,11 +99,9 @@ BufferLayer::~BufferLayer() { #endif } bool BufferLayer::isProtected() const { bool BufferLayer::isProtected() const { const sp<GraphicBuffer>& activeBuffer(mActiveBuffer); return (activeBuffer != 0) && (activeBuffer->getUsage() & GRALLOC_USAGE_PROTECTED); return (activeBuffer != 0) && (activeBuffer->getUsage() & GRALLOC_USAGE_PROTECTED); } bool BufferLayer::isVisible() const { Loading Loading @@ -605,8 +603,7 @@ void BufferLayer::setPerFrameData(const sp<const DisplayDevice>& hw, } #endif bool BufferLayer::isOpaque(const Layer::State& s) const { bool BufferLayer::isOpaque(const Layer::State& s) const { // if we don't have a buffer or sidebandStream yet, we're translucent regardless of the // layer's opaque flag. if ((mSidebandStream == nullptr) && (mActiveBuffer == nullptr)) { Loading Loading @@ -730,8 +727,7 @@ bool BufferLayer::getOpacityForFormat(uint32_t format) { return true; } void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { void BufferLayer::drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const { const State& s(getDrawingState()); computeGeometry(renderArea, mMesh, useIdentityTransform); Loading
services/surfaceflinger/BufferLayer.h +4 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ #pragma once #include "Layer.h" #include "Client.h" #include "Layer.h" #include "DisplayHardware/HWComposer.h" #include "DisplayHardware/HWComposerBufferCache.h" #include "FrameTracker.h" Loading Loading @@ -118,7 +118,8 @@ public: #ifdef USE_HWC2 void setPerFrameData(const sp<const DisplayDevice>& displayDevice); #else void setPerFrameData(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer); void setPerFrameData(const sp<const DisplayDevice>& hw, HWComposer::HWCLayerInterface& layer); #endif bool isOpaque(const Layer::State& s) const override; Loading @@ -137,8 +138,7 @@ private: static bool getOpacityForFormat(uint32_t format); // drawing void drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const; void drawWithOpenGL(const RenderArea& renderArea, bool useIdentityTransform) const; // Temporary - Used only for LEGACY camera mode. uint32_t getProducerStickyTransform() const; Loading
services/surfaceflinger/ColorLayer.cpp +6 −8 Original line number Diff line number Diff line Loading @@ -18,8 +18,8 @@ #undef LOG_TAG #define LOG_TAG "ColorLayer" #include <stdlib.h> #include <stdint.h> #include <stdlib.h> #include <sys/types.h> #include <utils/Errors.h> Loading @@ -28,17 +28,16 @@ #include <ui/GraphicBuffer.h> #include "ColorLayer.h" #include "SurfaceFlinger.h" #include "DisplayDevice.h" #include "RenderEngine/RenderEngine.h" #include "SurfaceFlinger.h" namespace android { // --------------------------------------------------------------------------- ColorLayer::ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags) ColorLayer::ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags) : Layer(flinger, client, name, w, h, flags) { // drawing state & current state are identical mDrawingState = mCurrentState; } Loading @@ -62,7 +61,6 @@ bool ColorLayer::isVisible() const { return !isHiddenByPolicy() && s.color.a; } // --------------------------------------------------------------------------- }; // namespace android
services/surfaceflinger/ColorLayer.h +4 −4 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ namespace android { class ColorLayer : public Layer { public: ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags); ColorLayer(SurfaceFlinger* flinger, const sp<Client>& client, const String8& name, uint32_t w, uint32_t h, uint32_t flags); virtual ~ColorLayer() = default; virtual const char* getTypeId() const { return "ColorLayer"; } Loading