aboutsummaryrefslogtreecommitdiffstats
path: root/gpu/include/GrTouchGesture.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/include/GrTouchGesture.h')
-rw-r--r--gpu/include/GrTouchGesture.h56
1 files changed, 0 insertions, 56 deletions
diff --git a/gpu/include/GrTouchGesture.h b/gpu/include/GrTouchGesture.h
deleted file mode 100644
index 03f970b..0000000
--- a/gpu/include/GrTouchGesture.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef GrTouchGesture_DEFINED
-#define GrTouchGesture_DEFINED
-
-#include "GrTypes.h"
-#include "SkTDArray.h"
-#include "SkMatrix.h"
-
-#include "FlingState.h"
-
-class GrTouchGesture {
-public:
- GrTouchGesture();
- ~GrTouchGesture();
-
- void touchBegin(void* owner, float x, float y);
- void touchMoved(void* owner, float x, float y);
- void touchEnd(void* owner);
- void reset();
-
- const SkMatrix& localM();
- const SkMatrix& globalM() const { return fGlobalM; }
-
-private:
- enum State {
- kEmpty_State,
- kTranslate_State,
- kZoom_State,
- };
-
- struct Rec {
- void* fOwner;
- float fStartX, fStartY;
- float fPrevX, fPrevY;
- float fLastX, fLastY;
- SkMSec fPrevT, fLastT;
- };
- SkTDArray<Rec> fTouches;
-
- State fState;
- SkMatrix fLocalM, fGlobalM;
- FlingState fFlinger;
- SkMSec fLastUpT;
- SkPoint fLastUpP;
-
-
- void flushLocalM();
- int findRec(void* owner) const;
- void appendNewRec(void* owner, float x, float y);
- float computePinch(const Rec&, const Rec&);
- float limitTotalZoom(float scale) const;
- bool handleDblTap(float, float);
-};
-
-#endif
-
-