Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89a9d6fc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Run clang-format on Layer/SurfaceFlinger files"

parents 6c96b71e 41fdfc92
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -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 {
@@ -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)) {
@@ -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);
+4 −4
Original line number Diff line number Diff line
@@ -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"
@@ -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;

@@ -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;
+6 −8
Original line number Diff line number Diff line
@@ -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>
@@ -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;
}
@@ -62,7 +61,6 @@ bool ColorLayer::isVisible() const {
    return !isHiddenByPolicy() && s.color.a;
}


// ---------------------------------------------------------------------------

}; // namespace android
+4 −4
Original line number Diff line number Diff line
@@ -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"; }
+179 −255

File changed.File mode changed from 100755 to 100644.

Preview size limit exceeded, changes collapsed.

Loading