mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Another paranoid attempt to avoid Wildfire problem
git-svn-id: https://zxing.googlecode.com/svn/trunk@1641 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
20cac4ff82
commit
5798f40398
|
@ -119,19 +119,23 @@ public final class ViewfinderView extends View {
|
|||
lastPossibleResultPoints = currentPossible;
|
||||
paint.setAlpha(OPAQUE);
|
||||
paint.setColor(resultPointColor);
|
||||
for (ResultPoint point : currentPossible) {
|
||||
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
||||
frame.top + (int) (point.getY() * scaleY),
|
||||
6.0f, paint);
|
||||
synchronized (currentPossible) {
|
||||
for (ResultPoint point : currentPossible) {
|
||||
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
||||
frame.top + (int) (point.getY() * scaleY),
|
||||
6.0f, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentLast != null) {
|
||||
paint.setAlpha(OPAQUE / 2);
|
||||
paint.setColor(resultPointColor);
|
||||
for (ResultPoint point : currentLast) {
|
||||
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
||||
frame.top + (int) (point.getY() * scaleY),
|
||||
3.0f, paint);
|
||||
synchronized (currentLast) {
|
||||
for (ResultPoint point : currentLast) {
|
||||
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
||||
frame.top + (int) (point.getY() * scaleY),
|
||||
3.0f, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +161,9 @@ public final class ViewfinderView extends View {
|
|||
}
|
||||
|
||||
public void addPossibleResultPoint(ResultPoint point) {
|
||||
possibleResultPoints.add(point);
|
||||
synchronized (possibleResultPoints) {
|
||||
possibleResultPoints.add(point);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue