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,21 +119,25 @@ public final class ViewfinderView extends View {
|
||||||
lastPossibleResultPoints = currentPossible;
|
lastPossibleResultPoints = currentPossible;
|
||||||
paint.setAlpha(OPAQUE);
|
paint.setAlpha(OPAQUE);
|
||||||
paint.setColor(resultPointColor);
|
paint.setColor(resultPointColor);
|
||||||
|
synchronized (currentPossible) {
|
||||||
for (ResultPoint point : currentPossible) {
|
for (ResultPoint point : currentPossible) {
|
||||||
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
||||||
frame.top + (int) (point.getY() * scaleY),
|
frame.top + (int) (point.getY() * scaleY),
|
||||||
6.0f, paint);
|
6.0f, paint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (currentLast != null) {
|
if (currentLast != null) {
|
||||||
paint.setAlpha(OPAQUE / 2);
|
paint.setAlpha(OPAQUE / 2);
|
||||||
paint.setColor(resultPointColor);
|
paint.setColor(resultPointColor);
|
||||||
|
synchronized (currentLast) {
|
||||||
for (ResultPoint point : currentLast) {
|
for (ResultPoint point : currentLast) {
|
||||||
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
canvas.drawCircle(frame.left + (int) (point.getX() * scaleX),
|
||||||
frame.top + (int) (point.getY() * scaleY),
|
frame.top + (int) (point.getY() * scaleY),
|
||||||
3.0f, paint);
|
3.0f, paint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Request another update at the animation interval, but only repaint the laser line,
|
// Request another update at the animation interval, but only repaint the laser line,
|
||||||
// not the entire viewfinder mask.
|
// not the entire viewfinder mask.
|
||||||
|
@ -157,7 +161,9 @@ public final class ViewfinderView extends View {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPossibleResultPoint(ResultPoint point) {
|
public void addPossibleResultPoint(ResultPoint point) {
|
||||||
|
synchronized (possibleResultPoints) {
|
||||||
possibleResultPoints.add(point);
|
possibleResultPoints.add(point);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue