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

Commit 40646ed7 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11760402 from 2e8e2306 to 24Q3-release

Change-Id: If6c923dfb8b3496569e905ffcab4cbb593b36417
parents 6c9b2699 2e8e2306
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ public:
    void initialize(int32_t id, int32_t generation, int32_t controllerNumber,
                    const InputDeviceIdentifier& identifier, const std::string& alias,
                    bool isExternal, bool hasMic, int32_t associatedDisplayId,
                    InputDeviceViewBehavior viewBehavior = {{}});
                    InputDeviceViewBehavior viewBehavior = {{}}, bool enabled = true);

    inline int32_t getId() const { return mId; }
    inline int32_t getControllerNumber() const { return mControllerNumber; }
@@ -347,6 +347,9 @@ public:

    inline int32_t getAssociatedDisplayId() const { return mAssociatedDisplayId; }

    inline void setEnabled(bool enabled) { mEnabled = enabled; }
    inline bool isEnabled() const { return mEnabled; }

private:
    int32_t mId;
    int32_t mGeneration;
@@ -361,6 +364,7 @@ private:
    std::shared_ptr<KeyCharacterMap> mKeyCharacterMap;
    std::optional<InputDeviceUsiVersion> mUsiVersion;
    int32_t mAssociatedDisplayId;
    bool mEnabled;

    bool mHasVibrator;
    bool mHasBattery;
+20 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H

#include <stdint.h>
#include <android/performance_hint.h>

__BEGIN_DECLS

@@ -75,6 +76,15 @@ enum SessionHint: int32_t {
    GPU_LOAD_RESET = 7,
};

// Allows access to PowerHAL's SessionTags without needing to import its AIDL
enum class SessionTag : int32_t {
  OTHER = 0,
  SURFACEFLINGER = 1,
  HWUI = 2,
  GAME = 3,
  APP = 4,
};

/**
 * Sends performance hints to inform the hint session of changes in the workload.
 *
@@ -83,14 +93,22 @@ enum SessionHint: int32_t {
 * @return 0 on success
 *         EPIPE if communication with the system service has failed.
 */
int APerformanceHint_sendHint(void* session, SessionHint hint);
int APerformanceHint_sendHint(APerformanceHintSession* session, SessionHint hint);

/**
 * Return the list of thread ids, this API should only be used for testing only.
 */
int APerformanceHint_getThreadIds(void* aPerformanceHintSession,
int APerformanceHint_getThreadIds(APerformanceHintSession* session,
                                  int32_t* const threadIds, size_t* const size);

/**
 * Creates a session with additional options
 */
APerformanceHintSession* APerformanceHint_createSessionInternal(APerformanceHintManager* manager,
                                        const int32_t* threadIds, size_t size,
                                        int64_t initialTargetWorkDurationNanos, SessionTag tag);


__END_DECLS

#endif // ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H
+3 −1
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ InputDeviceInfo::InputDeviceInfo(const InputDeviceInfo& other)
        mKeyCharacterMap(other.mKeyCharacterMap),
        mUsiVersion(other.mUsiVersion),
        mAssociatedDisplayId(other.mAssociatedDisplayId),
        mEnabled(other.mEnabled),
        mHasVibrator(other.mHasVibrator),
        mHasBattery(other.mHasBattery),
        mHasButtonUnderPad(other.mHasButtonUnderPad),
@@ -202,7 +203,7 @@ InputDeviceInfo::~InputDeviceInfo() {
void InputDeviceInfo::initialize(int32_t id, int32_t generation, int32_t controllerNumber,
                                 const InputDeviceIdentifier& identifier, const std::string& alias,
                                 bool isExternal, bool hasMic, int32_t associatedDisplayId,
                                 InputDeviceViewBehavior viewBehavior) {
                                 InputDeviceViewBehavior viewBehavior, bool enabled) {
    mId = id;
    mGeneration = generation;
    mControllerNumber = controllerNumber;
@@ -213,6 +214,7 @@ void InputDeviceInfo::initialize(int32_t id, int32_t generation, int32_t control
    mSources = 0;
    mKeyboardType = AINPUT_KEYBOARD_TYPE_NONE;
    mAssociatedDisplayId = associatedDisplayId;
    mEnabled = enabled;
    mHasVibrator = false;
    mHasBattery = false;
    mHasButtonUnderPad = false;
+1 −3
Original line number Diff line number Diff line
@@ -420,9 +420,7 @@ void SkiaRenderEngine::mapExternalTextureBuffer(const sp<GraphicBuffer>& buffer,

    // If we were to support caching protected buffers then we will need to switch the
    // currently bound context if we are not already using the protected context (and subsequently
    // switch back after the buffer is cached).  However, for non-protected content we can bind
    // the texture in either GL context because they are initialized with the same share_context
    // which allows the texture state to be shared between them.
    // switch back after the buffer is cached).
    auto context = getActiveContext();
    auto& cache = mTextureCache;

+0 −3
Original line number Diff line number Diff line
@@ -168,9 +168,6 @@ private:
    // Number of external holders of ExternalTexture references, per GraphicBuffer ID.
    std::unordered_map<GraphicBufferId, int32_t> mGraphicBufferExternalRefs
            GUARDED_BY(mRenderingMutex);
    // For GL, this cache is shared between protected and unprotected contexts. For Vulkan, it is
    // only used for the unprotected context, because Vulkan does not allow sharing between
    // contexts, and protected is less common.
    std::unordered_map<GraphicBufferId, std::shared_ptr<AutoBackendTexture::LocalRef>> mTextureCache
            GUARDED_BY(mRenderingMutex);
    std::unordered_map<shaders::LinearEffect, sk_sp<SkRuntimeEffect>, shaders::LinearEffectHasher>
Loading