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

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

Merge "Move FloatRect from libgfx to libui"

parents 7777e9f6 5a423eaa
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#pragma once

namespace android {
namespace gfx {

class FloatRect {
public:
@@ -38,5 +37,4 @@ inline bool operator==(const FloatRect& a, const FloatRect& b) {
    return a.left == b.left && a.top == b.top && a.right == b.right && a.bottom == b.bottom;
}

}  // namespace gfx
}  // namespace android
+2 −2
Original line number Diff line number Diff line
@@ -17,12 +17,12 @@
#ifndef ANDROID_UI_RECT
#define ANDROID_UI_RECT

#include <gfx/FloatRect.h>
#include <utils/Flattenable.h>
#include <utils/Log.h>
#include <utils/TypeHelpers.h>
#include <log/log.h>

#include <ui/FloatRect.h>
#include <ui/Point.h>

#include <android/rect.h>
@@ -185,7 +185,7 @@ public:
    inline int32_t height() const { return getHeight(); }
    inline void set(const Rect& rhs) { operator = (rhs); }

    gfx::FloatRect toFloatRect() const {
    FloatRect toFloatRect() const {
        return {static_cast<float>(left), static_cast<float>(top),
                static_cast<float>(right), static_cast<float>(bottom)};
    }
+2 −3
Original line number Diff line number Diff line
@@ -23,9 +23,8 @@
#include "HWC2.h"
#include "ComposerHal.h"

#include <gfx/FloatRect.h>

#include <ui/Fence.h>
#include <ui/FloatRect.h>
#include <ui/GraphicBuffer.h>
#include <ui/Region.h>

@@ -74,12 +73,12 @@ extern "C" {
}

using android::Fence;
using android::FloatRect;
using android::GraphicBuffer;
using android::HdrCapabilities;
using android::Rect;
using android::Region;
using android::sp;
using android::gfx::FloatRect;
using android::hardware::Return;
using android::hardware::Void;

+2 −4
Original line number Diff line number Diff line
@@ -38,12 +38,10 @@

namespace android {
    class Fence;
    class FloatRect;
    class GraphicBuffer;
    class Rect;
    class Region;
    namespace gfx {
        class FloatRect;
    }
    namespace Hwc2 {
        class Composer;
    }
@@ -410,7 +408,7 @@ public:
    [[clang::warn_unused_result]] Error setSidebandStream(
            const native_handle_t* stream);
    [[clang::warn_unused_result]] Error setSourceCrop(
            const android::gfx::FloatRect& crop);
            const android::FloatRect& crop);
    [[clang::warn_unused_result]] Error setTransform(Transform transform);
    [[clang::warn_unused_result]] Error setVisibleRegion(
            const android::Region& region);
+1 −1
Original line number Diff line number Diff line
@@ -1031,7 +1031,7 @@ public:
    virtual void setFrame(const Rect& frame) {
        getLayer()->displayFrame = reinterpret_cast<hwc_rect_t const&>(frame);
    }
    virtual void setCrop(const gfx::FloatRect& crop) {
    virtual void setCrop(const FloatRect& crop) {
        if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_3)) {
            getLayer()->sourceCropf = reinterpret_cast<hwc_frect_t const&>(crop);
        } else {
Loading