Add new parameter to the render method to allow forcing a measure pass.
Change-Id: I60c09f3375fc85c257a449f4372220741e01db54
(cherry picked from commit c13aa0c035)
This commit is contained in:
@@ -86,11 +86,14 @@ public class BridgeRenderSession extends RenderSession {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result render(long timeout) {
|
||||
public Result render(long timeout, boolean forceMeasure) {
|
||||
try {
|
||||
Bridge.prepareThread();
|
||||
mLastResult = mSession.acquire(timeout);
|
||||
if (mLastResult.isSuccess()) {
|
||||
if (forceMeasure) {
|
||||
mSession.invalidateRenderingSize();
|
||||
}
|
||||
mLastResult = mSession.render(false /*freshRender*/);
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -1642,7 +1642,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void invalidateRenderingSize() {
|
||||
public void invalidateRenderingSize() {
|
||||
mMeasuredScreenWidth = mMeasuredScreenHeight = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user