am c69775d6
: Merge "fix [2664345] Flash: Bad flicker at the end of a pinch zoom." into froyo
Merge commit 'c69775d616c25d31dcea119ab1e7af19148853e2' into froyo-plus-aosp * commit 'c69775d616c25d31dcea119ab1e7af19148853e2': fix [2664345] Flash: Bad flicker at the end of a pinch zoom.
This commit is contained in:
@ -281,9 +281,28 @@ void Layer::onDraw(const Region& clip) const
|
|||||||
GLuint textureName = mTextures[index].name;
|
GLuint textureName = mTextures[index].name;
|
||||||
if (UNLIKELY(textureName == -1LU)) {
|
if (UNLIKELY(textureName == -1LU)) {
|
||||||
// the texture has not been created yet, this Layer has
|
// the texture has not been created yet, this Layer has
|
||||||
// in fact never been drawn into. this happens frequently with
|
// in fact never been drawn into. This happens frequently with
|
||||||
// SurfaceView.
|
// SurfaceView because the WindowManager can't know when the client
|
||||||
clearWithOpenGL(clip);
|
// has drawn the first time.
|
||||||
|
|
||||||
|
// If there is nothing under us, we paint the screen in black, otherwise
|
||||||
|
// we just skip this update.
|
||||||
|
|
||||||
|
// figure out if there is something below us
|
||||||
|
Region under;
|
||||||
|
const SurfaceFlinger::LayerVector& drawingLayers(mFlinger->mDrawingState.layersSortedByZ);
|
||||||
|
const size_t count = drawingLayers.size();
|
||||||
|
for (size_t i=0 ; i<count ; ++i) {
|
||||||
|
const sp<LayerBase>& layer(drawingLayers[i]);
|
||||||
|
if (layer.get() == static_cast<LayerBase const*>(this))
|
||||||
|
break;
|
||||||
|
under.orSelf(layer->visibleRegionScreen);
|
||||||
|
}
|
||||||
|
// if not everything below us is covered, we plug the holes!
|
||||||
|
Region holes(clip.subtract(under));
|
||||||
|
if (!holes.isEmpty()) {
|
||||||
|
clearWithOpenGL(holes);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
drawWithOpenGL(clip, mTextures[index]);
|
drawWithOpenGL(clip, mTextures[index]);
|
||||||
|
Reference in New Issue
Block a user