LibreOffice Module android (master) 1
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy Class Reference

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...

Inheritance diagram for org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy:
[legend]
Collaboration diagram for org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy:
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ aboutToCheckerboard()

boolean org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.aboutToCheckerboard ( ImmutableViewportMetrics  metrics,
PointF  velocity,
DisplayPortMetrics  displayPort 
)
inline

◆ calculate()

DisplayPortMetrics org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.calculate ( ImmutableViewportMetrics  metrics,
PointF  velocity 
)
inline

◆ drawTimeUpdate()

boolean org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.drawTimeUpdate ( long  millis,
int  pixels 
)
inline

◆ resetPageState()

void org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.resetPageState ( )
inline

◆ toString()

String org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.toString ( )
inline

Member Data Documentation

◆ mMaxFramesToDraw

int org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMaxFramesToDraw
private

◆ mMinFramesToDraw

int org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mMinFramesToDraw
private

◆ mPixelArea

int org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.mPixelArea
private

◆ VELOCITY_THRESHOLD

float org.mozilla.gecko.gfx.DisplayPortCalculator.PredictionBiasStrategy.VELOCITY_THRESHOLD
staticprivate

The documentation for this class was generated from the following file: