LibreOffice Module android (master) 1
|
This class implements the variation where we use the draw time to predict where we will be when a draw completes, and draw that instead of where we are now. More...
Public Member Functions | |
DisplayPortMetrics | calculate (ImmutableViewportMetrics metrics, PointF velocity) |
Calculates a displayport given a viewport and panning velocity. More... | |
boolean | aboutToCheckerboard (ImmutableViewportMetrics metrics, PointF velocity, DisplayPortMetrics displayPort) |
Returns true if a checkerboard is about to be visible and we should not throttle drawing. More... | |
boolean | drawTimeUpdate (long millis, int pixels) |
Notify the strategy of a new recorded draw time. More... | |
void | resetPageState () |
Reset any page-specific state stored, as the page being displayed has changed. More... | |
String | toString () |
abstract DisplayPortMetrics | calculate (ImmutableViewportMetrics metrics, PointF velocity) |
Calculates a displayport given a viewport and panning velocity. More... | |
abstract boolean | aboutToCheckerboard (ImmutableViewportMetrics metrics, PointF velocity, DisplayPortMetrics displayPort) |
Returns true if a checkerboard is about to be visible and we should not throttle drawing. More... | |
boolean | drawTimeUpdate (long millis, int pixels) |
Notify the strategy of a new recorded draw time. More... | |
void | resetPageState () |
Reset any page-specific state stored, as the page being displayed has changed. More... | |
Private Attributes | |
int | mPixelArea |
int | mMinFramesToDraw |
int | mMaxFramesToDraw |
Static Private Attributes | |
static float | VELOCITY_THRESHOLD |
This class implements the variation where we use the draw time to predict where we will be when a draw completes, and draw that instead of where we are now.
In this variation, when our panning speed drops below a certain threshold, we draw 9 viewports' worth of content so that the user can pan in any direction without encountering checkerboarding. Once the user is panning, we modify the displayport to encompass an area range of where we think the user will be when the draw completes. This heuristic relies on both the estimated draw time the panning velocity; unexpected changes in either of these values will cause the heuristic to fail and show checkerboard.
Definition at line 658 of file DisplayPortCalculator.java.
|
inline |
Returns true if a checkerboard is about to be visible and we should not throttle drawing.
Reimplemented from org.mozilla.gecko.gfx.DisplayPortCalculator.DisplayPortStrategy.
Definition at line 706 of file DisplayPortCalculator.java.
References org.mozilla.gecko.gfx.DisplayPortMetrics.contains(), org.mozilla.gecko.gfx.ImmutableViewportMetrics.getHeight(), org.mozilla.gecko.gfx.ImmutableViewportMetrics.getViewport(), org.mozilla.gecko.gfx.ImmutableViewportMetrics.getWidth(), Math, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMaxFramesToDraw, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMinFramesToDraw, and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mPixelArea.
|
inline |
Calculates a displayport given a viewport and panning velocity.
Reimplemented from org.mozilla.gecko.gfx.DisplayPortCalculator.DisplayPortStrategy.
Definition at line 670 of file DisplayPortCalculator.java.
References org.mozilla.gecko.gfx.ImmutableViewportMetrics.getHeight(), org.mozilla.gecko.gfx.ImmutableViewportMetrics.getWidth(), Math, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMaxFramesToDraw, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMinFramesToDraw, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mPixelArea, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.VELOCITY_THRESHOLD, and org.mozilla.gecko.gfx.ImmutableViewportMetrics.zoomFactor.
|
inline |
Notify the strategy of a new recorded draw time.
Return false to turn off draw time recording.
Reimplemented from org.mozilla.gecko.gfx.DisplayPortCalculator.DisplayPortStrategy.
Definition at line 731 of file DisplayPortCalculator.java.
References Log, LOGTAG, Math, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMaxFramesToDraw, org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMinFramesToDraw, and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mPixelArea.
|
inline |
Reset any page-specific state stored, as the page being displayed has changed.
Reimplemented from org.mozilla.gecko.gfx.DisplayPortCalculator.DisplayPortStrategy.
Definition at line 750 of file DisplayPortCalculator.java.
References org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMaxFramesToDraw, and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMinFramesToDraw.
|
inline |
Definition at line 756 of file DisplayPortCalculator.java.
References String, and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.VELOCITY_THRESHOLD.
|
private |
Definition at line 663 of file DisplayPortCalculator.java.
Referenced by org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.aboutToCheckerboard(), org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.calculate(), org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.drawTimeUpdate(), and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.resetPageState().
|
private |
Definition at line 662 of file DisplayPortCalculator.java.
Referenced by org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.aboutToCheckerboard(), org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.calculate(), org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.drawTimeUpdate(), and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.resetPageState().
|
private |
Definition at line 661 of file DisplayPortCalculator.java.
Referenced by org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.aboutToCheckerboard(), org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.calculate(), and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.drawTimeUpdate().
|
staticprivate |
Definition at line 659 of file DisplayPortCalculator.java.
Referenced by org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.calculate(), and org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.toString().