OLD | NEW |
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 "SkPicturePlayback.h" | 9 #include "SkPicturePlayback.h" |
10 #include "SkPictureRecord.h" | 10 #include "SkPictureRecord.h" |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 canvas.drawVertices(vmode, vCount, verts, texs, colors, xfer, | 1272 canvas.drawVertices(vmode, vCount, verts, texs, colors, xfer, |
1273 indices, iCount, paint); | 1273 indices, iCount, paint); |
1274 } break; | 1274 } break; |
1275 case RESTORE: | 1275 case RESTORE: |
1276 canvas.restore(); | 1276 canvas.restore(); |
1277 break; | 1277 break; |
1278 case ROTATE: | 1278 case ROTATE: |
1279 canvas.rotate(reader.readScalar()); | 1279 canvas.rotate(reader.readScalar()); |
1280 break; | 1280 break; |
1281 case SAVE: | 1281 case SAVE: |
1282 canvas.save((SkCanvas::SaveFlags) reader.readInt()); | 1282 canvas.save(); |
1283 break; | 1283 break; |
1284 case SAVE_LAYER: { | 1284 case SAVE_LAYER: { |
1285 const SkRect* boundsPtr = this->getRectPtr(reader); | 1285 const SkRect* boundsPtr = this->getRectPtr(reader); |
1286 const SkPaint* paint = this->getPaint(reader); | 1286 const SkPaint* paint = this->getPaint(reader); |
1287 canvas.saveLayer(boundsPtr, paint, (SkCanvas::SaveFlags) reader.
readInt()); | 1287 canvas.saveLayer(boundsPtr, paint, (SkCanvas::SaveFlags) reader.
readInt()); |
1288 } break; | 1288 } break; |
1289 case SCALE: { | 1289 case SCALE: { |
1290 SkScalar sx = reader.readScalar(); | 1290 SkScalar sx = reader.readScalar(); |
1291 SkScalar sy = reader.readScalar(); | 1291 SkScalar sy = reader.readScalar(); |
1292 canvas.scale(sx, sy); | 1292 canvas.scale(sx, sy); |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1889 for (index = 0; index < fPictureCount; index++) | 1889 for (index = 0; index < fPictureCount; index++) |
1890 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), | 1890 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), |
1891 "picture%p, ", fPictureRefs[index]); | 1891 "picture%p, ", fPictureRefs[index]); |
1892 if (fPictureCount > 0) | 1892 if (fPictureCount > 0) |
1893 SkDebugf("%s0};\n", pBuffer); | 1893 SkDebugf("%s0};\n", pBuffer); |
1894 | 1894 |
1895 const_cast<SkPicturePlayback*>(this)->dumpStream(); | 1895 const_cast<SkPicturePlayback*>(this)->dumpStream(); |
1896 } | 1896 } |
1897 | 1897 |
1898 #endif | 1898 #endif |
OLD | NEW |