diff options
author | Michael Wright <michaelwr@google.com> | 2014-02-05 18:02:40 -0800 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2014-02-10 12:59:34 -0800 |
commit | a407d6a003d746fa0aff50f7ba5da61f19a85b75 (patch) | |
tree | 47f16be39026a324f3aeff1d534932c7cb3cd03a /libs/input/InputDispatcher.cpp | |
parent | d5154ec2bc7e7c0bdfd14fc784912d390afe43cc (diff) | |
download | frameworks_base-a407d6a003d746fa0aff50f7ba5da61f19a85b75.zip frameworks_base-a407d6a003d746fa0aff50f7ba5da61f19a85b75.tar.gz frameworks_base-a407d6a003d746fa0aff50f7ba5da61f19a85b75.tar.bz2 |
Remove SkRegion dependency from libinput
This gets us one step closer to removing our dependency on Skia, which is at
least one of the things blocking us from moving the input system out of
f/b.
Change-Id: I755e6267996c93fe700f1056327386923287575a
Diffstat (limited to 'libs/input/InputDispatcher.cpp')
-rw-r--r-- | libs/input/InputDispatcher.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/input/InputDispatcher.cpp b/libs/input/InputDispatcher.cpp index 10a639e..8c8e705 100644 --- a/libs/input/InputDispatcher.cpp +++ b/libs/input/InputDispatcher.cpp @@ -48,6 +48,7 @@ #include <utils/Trace.h> #include <cutils/log.h> #include <androidfw/PowerManager.h> +#include <ui/Region.h> #include <stddef.h> #include <unistd.h> @@ -172,21 +173,23 @@ static bool isMainDisplay(int32_t displayId) { return displayId == ADISPLAY_ID_DEFAULT || displayId == ADISPLAY_ID_NONE; } -static void dumpRegion(String8& dump, const SkRegion& region) { +static void dumpRegion(String8& dump, const Region& region) { if (region.isEmpty()) { dump.append("<empty>"); return; } bool first = true; - for (SkRegion::Iterator it(region); !it.done(); it.next()) { + Region::const_iterator cur = region.begin(); + Region::const_iterator const tail = region.end(); + while (cur != tail) { if (first) { first = false; } else { dump.append("|"); } - const SkIRect& rect = it.rect(); - dump.appendFormat("[%d,%d][%d,%d]", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom); + dump.appendFormat("[%d,%d][%d,%d]", cur->left, cur->top, cur->right, cur->bottom); + cur++; } } |