Skip to content
Snippets Groups Projects
Commit eebba5ef authored by Kartikaya Gupta's avatar Kartikaya Gupta
Browse files

Bug 1289432 - Use RefPtr instead of UniquePtr to hold the block state objects,...

Bug 1289432 - Use RefPtr instead of UniquePtr to hold the block state objects, since there will be multiple references to them soon. r=botond

MozReview-Commit-ID: BhWf1omgfoC
parent 6a9ddd12
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
#define mozilla_layers_InputBlockState_h
#include "InputData.h" // for MultiTouchInput
#include "mozilla/RefCounted.h" // for RefCounted
#include "mozilla/RefPtr.h" // for RefPtr
#include "mozilla/gfx/Matrix.h" // for Matrix4x4
#include "mozilla/layers/APZUtils.h" // for TouchBehaviorFlags
......@@ -34,9 +35,11 @@ class PanGestureBlockState;
* from inside AsyncPanZoomController should ensure that the APZC lock is not
* held.
*/
class InputBlockState
class InputBlockState : public RefCounted<InputBlockState>
{
public:
MOZ_DECLARE_REFCOUNTED_TYPENAME(InputBlockState)
static const uint64_t NO_BLOCK_ID = 0;
enum class TargetConfirmationState {
......
......@@ -11,7 +11,6 @@
#include "InputData.h"
#include "mozilla/EventForwards.h"
#include "mozilla/RefPtr.h"
#include "mozilla/UniquePtr.h"
#include "nsTArray.h"
#include "TouchCounter.h"
......@@ -184,7 +183,7 @@ private:
private:
// The queue of input blocks that have not yet been fully processed.
// This member must only be accessed on the controller/UI thread.
nsTArray<UniquePtr<CancelableBlockState>> mInputBlockQueue;
nsTArray<RefPtr<CancelableBlockState>> mInputBlockQueue;
// The APZC to which the last event was delivered
RefPtr<AsyncPanZoomController> mLastActiveApzc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment