Skip to content

Commit

Permalink
fix(render): don't need redraw when nothing be changed
Browse files Browse the repository at this point in the history
  • Loading branch information
skufly authored and pingkai committed Feb 20, 2020
1 parent f823d27 commit 0f16185
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions framework/render/video/glRender/CV420PProgramContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ int CV420PProgramContext::updateFrame(std::unique_ptr<IAFFrame> &frame) {
}
}

if (frame == nullptr && !mProjectionChanged && !mRegionChanged && !mCoordsChanged) {
//frame is null and nothing changed , don`t need redraw. such as paused.
return -1;
}

if (mProjectionChanged) {
updateUProjection();
mProjectionChanged = false;
Expand Down

0 comments on commit 0f16185

Please sign in to comment.