Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: src/core/SkPictureRecord.cpp

Issue 164823003: Improve saveLayer handling in SkMatrixClipStateMgr (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix another compiler issue Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkMatrixClipStateMgr.cpp ('k') | tests/MatrixClipCollapseTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPictureRecord.h" 8 #include "SkPictureRecord.h"
9 #include "SkTSearch.h" 9 #include "SkTSearch.h"
10 #include "SkPixelRef.h" 10 #include "SkPixelRef.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 // turned on permanently. 591 // turned on permanently.
592 #if 0 592 #if 0
593 SkASSERT(fRestoreOffsetStack.count() > 1); 593 SkASSERT(fRestoreOffsetStack.count() > 1);
594 #endif 594 #endif
595 595
596 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE 596 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
597 if (fMCMgr.getSaveCount() == 1) { 597 if (fMCMgr.getSaveCount() == 1) {
598 return; 598 return;
599 } 599 }
600 600
601 // TODO: don't write the restore to the op stream for normal saves
602 fMCMgr.restore(); 601 fMCMgr.restore();
603 #else 602 #else
604 // check for underflow 603 // check for underflow
605 if (fRestoreOffsetStack.count() == 0) { 604 if (fRestoreOffsetStack.count() == 0) {
606 return; 605 return;
607 } 606 }
608 607
609 if (fRestoreOffsetStack.count() == fFirstSavedLayerIndex) { 608 if (fRestoreOffsetStack.count() == fFirstSavedLayerIndex) {
610 fFirstSavedLayerIndex = kNoSavedLayerIndex; 609 fFirstSavedLayerIndex = kNoSavedLayerIndex;
611 } 610 }
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 void SkPictureRecord::validateRegions() const { 1772 void SkPictureRecord::validateRegions() const {
1774 int count = fRegions.count(); 1773 int count = fRegions.count();
1775 SkASSERT((unsigned) count < 0x1000); 1774 SkASSERT((unsigned) count < 0x1000);
1776 for (int index = 0; index < count; index++) { 1775 for (int index = 0; index < count; index++) {
1777 const SkFlatData* region = fRegions[index]; 1776 const SkFlatData* region = fRegions[index];
1778 SkASSERT(region); 1777 SkASSERT(region);
1779 // region->validate(); 1778 // region->validate();
1780 } 1779 }
1781 } 1780 }
1782 #endif 1781 #endif
OLDNEW
« no previous file with comments | « src/core/SkMatrixClipStateMgr.cpp ('k') | tests/MatrixClipCollapseTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698