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

Commit 086a996b authored by Michael Wright's avatar Michael Wright Committed by Automerger Merge Worker
Browse files

Move PointerController from sp to shared_ptr am: a512bfda

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1356587

Change-Id: Ia9dc3eb318db67b625ca88b0a5f93414b0b718c6
parents a77f6994 a512bfda
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -332,7 +332,8 @@ public:
    virtual void getReaderConfiguration(InputReaderConfiguration* outConfig) = 0;

    /* Gets a pointer controller associated with the specified cursor device (ie. a mouse). */
    virtual sp<PointerControllerInterface> obtainPointerController(int32_t deviceId) = 0;
    virtual std::shared_ptr<PointerControllerInterface> obtainPointerController(
            int32_t deviceId) = 0;

    /* Notifies the input reader policy that some input devices have changed
     * and provides information about all current input devices.
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ namespace android {
 * The pointer controller is responsible for providing synchronization and for tracking
 * display orientation changes if needed.
 */
class PointerControllerInterface : public virtual RefBase {
class PointerControllerInterface {
protected:
    PointerControllerInterface() { }
    virtual ~PointerControllerInterface() { }
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ private:

    int32_t mOrientation;

    sp<PointerControllerInterface> mPointerController;
    std::shared_ptr<PointerControllerInterface> mPointerController;

    int32_t mButtonState;
    nsecs_t mDownTime;
+2 −2
Original line number Diff line number Diff line
@@ -17,12 +17,12 @@
#ifndef _UI_INPUTREADER_TOUCH_CURSOR_INPUT_MAPPER_COMMON_H
#define _UI_INPUTREADER_TOUCH_CURSOR_INPUT_MAPPER_COMMON_H

#include <stdint.h>

#include "EventHub.h"
#include "InputListener.h"
#include "InputReaderContext.h"

#include <stdint.h>

namespace android {

// --- Static Definitions ---
+1 −1
Original line number Diff line number Diff line
@@ -778,7 +778,7 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
            mPointerController->setDisplayViewport(defaultViewport.value_or(mViewport));
        }
    } else {
        mPointerController.clear();
        mPointerController.reset();
    }

    if (viewportChanged || deviceModeChanged) {
Loading