diff options
author | jvanverth <jvanverth@google.com> | 2016-06-06 08:48:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-06 08:48:47 -0700 |
commit | 814e38d5c11e4b71b2c87d1e1fe7bc8e8d688288 (patch) | |
tree | 6c7439db15786aefb73f2fe8f8d6c7ce8f5159a7 /tools/viewer/Viewer.cpp | |
parent | 11450d5ec107b3b770d27c05b107ed5b187cb777 (diff) |
Use intptr_t for onTouch argument.
On 64-bit platforms, casting int to void* is not valid.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2047443002
Review-Url: https://codereview.chromium.org/2047443002
Diffstat (limited to 'tools/viewer/Viewer.cpp')
-rw-r--r-- | tools/viewer/Viewer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 7e345c5bbc..c11b82bec0 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -28,7 +28,7 @@ static void on_paint_handler(SkCanvas* canvas, void* userData) { return vv->onPaint(canvas); } -static bool on_touch_handler(int owner, Window::InputState state, float x, float y, void* userData) +static bool on_touch_handler(intptr_t owner, Window::InputState state, float x, float y, void* userData) { Viewer* viewer = reinterpret_cast<Viewer*>(userData); @@ -332,7 +332,7 @@ void Viewer::onPaint(SkCanvas* canvas) { fCommands.drawHelp(canvas); } -bool Viewer::onTouch(int owner, Window::InputState state, float x, float y) { +bool Viewer::onTouch(intptr_t owner, Window::InputState state, float x, float y) { void* castedOwner = reinterpret_cast<void*>(owner); SkPoint touchPoint = fDefaultMatrixInv.mapXY(x, y); switch (state) { |