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

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

Issue 340403003: SaveFlags be-gone (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: One more baseurl attempt Created 6 years, 5 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 | « src/core/SkMatrixClipStateMgr.cpp ('k') | src/core/SkPictureRecord.h » ('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 #include <new> 7 #include <new>
8 #include "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkDrawPictureCallback.h" 9 #include "SkDrawPictureCallback.h"
10 #include "SkPicturePlayback.h" 10 #include "SkPicturePlayback.h"
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 canvas.drawVertices(vmode, vCount, verts, texs, colors, xfer, 1300 canvas.drawVertices(vmode, vCount, verts, texs, colors, xfer,
1301 indices, iCount, paint); 1301 indices, iCount, paint);
1302 } break; 1302 } break;
1303 case RESTORE: 1303 case RESTORE:
1304 canvas.restore(); 1304 canvas.restore();
1305 break; 1305 break;
1306 case ROTATE: 1306 case ROTATE:
1307 canvas.rotate(reader.readScalar()); 1307 canvas.rotate(reader.readScalar());
1308 break; 1308 break;
1309 case SAVE: 1309 case SAVE:
1310 canvas.save((SkCanvas::SaveFlags) reader.readInt()); 1310 // SKPs with version < 29 also store a SaveFlags param.
1311 if (size > 4) {
1312 SkASSERT(8 == size);
1313 reader.readInt();
1314 }
1315 canvas.save();
1311 break; 1316 break;
1312 case SAVE_LAYER: { 1317 case SAVE_LAYER: {
1313 const SkRect* boundsPtr = this->getRectPtr(reader); 1318 const SkRect* boundsPtr = this->getRectPtr(reader);
1314 const SkPaint* paint = this->getPaint(reader); 1319 const SkPaint* paint = this->getPaint(reader);
1315 canvas.saveLayer(boundsPtr, paint, (SkCanvas::SaveFlags) reader. readInt()); 1320 canvas.saveLayer(boundsPtr, paint, (SkCanvas::SaveFlags) reader. readInt());
1316 } break; 1321 } break;
1317 case SCALE: { 1322 case SCALE: {
1318 SkScalar sx = reader.readScalar(); 1323 SkScalar sx = reader.readScalar();
1319 SkScalar sy = reader.readScalar(); 1324 SkScalar sy = reader.readScalar();
1320 canvas.scale(sx, sy); 1325 canvas.scale(sx, sy);
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 for (index = 0; index < fPictureCount; index++) 1922 for (index = 0; index < fPictureCount; index++)
1918 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1923 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1919 "picture%p, ", fPictureRefs[index]); 1924 "picture%p, ", fPictureRefs[index]);
1920 if (fPictureCount > 0) 1925 if (fPictureCount > 0)
1921 SkDebugf("%s0};\n", pBuffer); 1926 SkDebugf("%s0};\n", pBuffer);
1922 1927
1923 const_cast<SkPicturePlayback*>(this)->dumpStream(); 1928 const_cast<SkPicturePlayback*>(this)->dumpStream();
1924 } 1929 }
1925 1930
1926 #endif 1931 #endif
OLDNEW
« no previous file with comments | « src/core/SkMatrixClipStateMgr.cpp ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698