Added some assertions.
git-svn-id: http://skia.googlecode.com/svn/trunk@5184 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
c81686cd6e
commit
bffacc01d6
@ -70,6 +70,12 @@ void PictureRenderer::end() {
|
||||
}
|
||||
|
||||
void PictureRenderer::resetState() {
|
||||
SkASSERT(fCanvas.get() != NULL);
|
||||
SkASSERT(fPicture != NULL);
|
||||
if (NULL == fCanvas.get() || NULL == fPicture) {
|
||||
return;
|
||||
}
|
||||
|
||||
fCanvas->flush();
|
||||
|
||||
if (this->isUsingGpuDevice()) {
|
||||
@ -186,6 +192,12 @@ void TiledPictureRenderer::drawTiles() {
|
||||
}
|
||||
|
||||
void TiledPictureRenderer::resetState() {
|
||||
SkASSERT(fCanvas.get() != NULL);
|
||||
SkASSERT(fPicture != NULL);
|
||||
if (NULL == fCanvas.get() || NULL == fPicture) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < fTiles.count(); ++i) {
|
||||
fTiles[i].fCanvas->flush();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user