Free cached AA clip mask when create hard/stencil clip mask
http://codereview.appspot.com/6214050/ git-svn-id: http://skia.googlecode.com/svn/trunk@3983 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
526956644a
commit
5acc0e36d9
@ -121,6 +121,15 @@ bool GrClipMaskManager::createClipMask(GrGpu* gpu,
|
||||
}
|
||||
#endif // GR_AA_CLIP
|
||||
|
||||
// Either a hard (stencil buffer) clip was explicitly requested or
|
||||
// an antialiased clip couldn't be created. In either case, free up
|
||||
// the texture in the antialiased mask cache.
|
||||
// TODO: this may require more investigation. Ganesh performs a lot of
|
||||
// utility draws (e.g., clears, InOderDrawBuffer playbacks) that hit
|
||||
// the stencil buffer path. These may be incorrectly messing up the
|
||||
// AA cache.
|
||||
fAACache.reset();
|
||||
|
||||
GrRect bounds;
|
||||
GrRect rtRect;
|
||||
rtRect.setLTRB(0, 0,
|
||||
|
@ -67,6 +67,11 @@ GrContext* GrContext::Create(GrEngine engine,
|
||||
|
||||
GrContext::~GrContext() {
|
||||
this->flush();
|
||||
|
||||
// Since the gpu can hold scratch textures, give it a chance to let go
|
||||
// of them before freeing the texture cache
|
||||
fGpu->purgeResources();
|
||||
|
||||
delete fTextureCache;
|
||||
delete fFontCache;
|
||||
delete fDrawBuffer;
|
||||
|
Loading…
Reference in New Issue
Block a user