Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Issue 1763833002: Force tiles in SampleApp to integer boundaries. (Closed)

Created:
4 years, 9 months ago by bungeman-skia
Modified:
4 years, 9 months ago
Reviewers:
herb_g, reed1
CC:
reviews_skia.org, corey.lucier
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Force tiles in SampleApp to integer boundaries. The current behavior is to create tiles from the rounded ideal tile size, tell the tile that it's upper left pixel is at the ideal location, and then draw those tiles at the ideal locations. As a result, the tiles are be out of phase with each other internally and then actually drawn at the rounded pixel location instead of the ideal location. The new behavior is to always round up to get the tile size, make the tile translation an integer offset, and then draw at the exact pixel. This also modifies SampleApp to use the numeric keypad to provide an extra manual 1/32 pixel translation for fine grained movement. BUG=skia:5020 Committed: https://skia.googlesource.com/skia/+/ce56026db55d8585c2f920a6107a25b40fd5160a

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -14 lines) Patch
M samplecode/SampleApp.h View 3 chunks +2 lines, -1 line 0 comments Download
M samplecode/SampleApp.cpp View 10 chunks +39 lines, -13 lines 1 comment Download
M src/views/unix/XkeysToSkKeys.h View 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1763833002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1763833002/1
4 years, 9 months ago (2016-03-03 21:09:30 UTC) #5
bungeman-skia
This corrects the issue in SampleApp, is it possible other tilers are running into the ...
4 years, 9 months ago (2016-03-03 21:14:20 UTC) #7
reed1
lgtm
4 years, 9 months ago (2016-03-03 21:23:37 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-03 21:26:46 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1763833002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1763833002/1
4 years, 9 months ago (2016-03-03 21:31:44 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/ce56026db55d8585c2f920a6107a25b40fd5160a
4 years, 9 months ago (2016-03-03 21:32:41 UTC) #14
bungeman-skia
4 years, 9 months ago (2016-03-03 22:42:37 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/1763833002/diff/1/samplecode/SampleApp.cpp
File samplecode/SampleApp.cpp (left):

https://codereview.chromium.org/1763833002/diff/1/samplecode/SampleApp.cpp#ol...
samplecode/SampleApp.cpp:1074: tileCanvas->translate(-x, -y);
Just to make things more clear, when x and y are not integers this means that
the pixel at the origin of the canvas is no longer at an integer position. Every
calculation will be shifted by the fractional part, resulting in rounding being
out of phase from the rounding if the same were drawn with a slightly different
fractional part.

Powered by Google App Engine
This is Rietveld 408576698