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

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

Issue 430503004: Fix end-of-pattern matching for Skia recording optimization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Test fixes: leak, var names, lint Created 6 years, 4 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
« no previous file with comments | « no previous file | tests/PictureTest.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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 result[numMatched].fOffset = curOffset; 312 result[numMatched].fOffset = curOffset;
313 result[numMatched].fSize = curSize; 313 result[numMatched].fSize = curSize;
314 314
315 curOffset += curSize; 315 curOffset += curSize;
316 } 316 }
317 317
318 if (numMatched != numCommands) { 318 if (numMatched != numCommands) {
319 return false; 319 return false;
320 } 320 }
321 321
322 curOffset += curSize;
323 if (curOffset < writer->bytesWritten()) { 322 if (curOffset < writer->bytesWritten()) {
324 // Something else between the last command and the end of the stream 323 // Something else between the last command and the end of the stream
325 return false; 324 return false;
326 } 325 }
327 326
328 return true; 327 return true;
329 } 328 }
330 329
331 // temporarily here to make code review easier 330 // temporarily here to make code review easier
332 static bool merge_savelayer_paint_into_drawbitmp(SkWriter32* writer, 331 static bool merge_savelayer_paint_into_drawbitmp(SkWriter32* writer,
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 void SkPictureRecord::validateRegions() const { 1821 void SkPictureRecord::validateRegions() const {
1823 int count = fRegions.count(); 1822 int count = fRegions.count();
1824 SkASSERT((unsigned) count < 0x1000); 1823 SkASSERT((unsigned) count < 0x1000);
1825 for (int index = 0; index < count; index++) { 1824 for (int index = 0; index < count; index++) {
1826 const SkFlatData* region = fRegions[index]; 1825 const SkFlatData* region = fRegions[index];
1827 SkASSERT(region); 1826 SkASSERT(region);
1828 // region->validate(); 1827 // region->validate();
1829 } 1828 }
1830 } 1829 }
1831 #endif 1830 #endif
OLDNEW
« no previous file with comments | « no previous file | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698