diff options
| author | 2015-06-09 15:05:23 -0700 | |
|---|---|---|
| committer | 2015-06-11 10:20:23 -0700 | |
| commit | 68efa84e7e9e51a9f0d8c8bdd824664eb97aed98 (patch) | |
| tree | b6482a90e1edb63d318301ddedb7c2b687b5ea3d /libs/ui/FramebufferNativeWindow.cpp | |
| parent | 127cf2eff638a98c5318ba8b3edaf3ca651c4090 (diff) | |
GLConsumer: Fix crop math
When we have excess pixels that need to be removed from (for example)
the left and right sides, we currently do something like:
left += excess / 2;
right -= excess / 2;
If excess is odd, however, this removes 1 too few pixels since the odd
pixel gets rounded down twice. This changes the math to effectively:
left += excess / 2;
right -= (excess - excess / 2);
Which removes the correct total number of pixels.
Bug: 19611086
Change-Id: I8d1ad9fe7ba67c149794c148663d12acbccccef0
(cherry picked from commit ec4cb387502d5bd09e49b55605cf679fe3a0207a)
Diffstat (limited to 'libs/ui/FramebufferNativeWindow.cpp')
0 files changed, 0 insertions, 0 deletions