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

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

Issue 20806003: Plumb in "bleed" flag (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updated .skp version number Created 7 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkPicturePlayback.h" 8 #include "SkPicturePlayback.h"
9 #include "SkPictureRecord.h" 9 #include "SkPictureRecord.h"
10 #include "SkTypeface.h" 10 #include "SkTypeface.h"
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 const SkPaint* paint = getPaint(reader); 827 const SkPaint* paint = getPaint(reader);
828 const SkBitmap& bitmap = getBitmap(reader); 828 const SkBitmap& bitmap = getBitmap(reader);
829 const SkPoint& loc = reader.skipT<SkPoint>(); 829 const SkPoint& loc = reader.skipT<SkPoint>();
830 canvas.drawBitmap(bitmap, loc.fX, loc.fY, paint); 830 canvas.drawBitmap(bitmap, loc.fX, loc.fY, paint);
831 } break; 831 } break;
832 case DRAW_BITMAP_RECT_TO_RECT: { 832 case DRAW_BITMAP_RECT_TO_RECT: {
833 const SkPaint* paint = getPaint(reader); 833 const SkPaint* paint = getPaint(reader);
834 const SkBitmap& bitmap = getBitmap(reader); 834 const SkBitmap& bitmap = getBitmap(reader);
835 const SkRect* src = this->getRectPtr(reader); // may be null 835 const SkRect* src = this->getRectPtr(reader); // may be null
836 const SkRect& dst = reader.skipT<SkRect>(); // required 836 const SkRect& dst = reader.skipT<SkRect>(); // required
837 canvas.drawBitmapRectToRect(bitmap, src, dst, paint); 837 // TODO: remove this backwards compatibility code once the .skps are
838 // regenerated
839 SkCanvas::DrawBitmapRectFlags flags = SkCanvas::kNone_DrawBitmap Rectflag;
840 SkASSERT(32 == size || 48 == size || // old sizes
841 36 == size || 52 == size); // new sizes
842 if (36 == size || 52 == size) {
843 flags = (SkCanvas::DrawBitmapRectFlags) reader.readInt();
844 }
845 canvas.drawBitmapRectToRect(bitmap, src, dst, paint, flags);
838 } break; 846 } break;
839 case DRAW_BITMAP_MATRIX: { 847 case DRAW_BITMAP_MATRIX: {
840 const SkPaint* paint = getPaint(reader); 848 const SkPaint* paint = getPaint(reader);
841 const SkBitmap& bitmap = getBitmap(reader); 849 const SkBitmap& bitmap = getBitmap(reader);
842 const SkMatrix* matrix = getMatrix(reader); 850 const SkMatrix* matrix = getMatrix(reader);
843 canvas.drawBitmapMatrix(bitmap, *matrix, paint); 851 canvas.drawBitmapMatrix(bitmap, *matrix, paint);
844 } break; 852 } break;
845 case DRAW_BITMAP_NINE: { 853 case DRAW_BITMAP_NINE: {
846 const SkPaint* paint = getPaint(reader); 854 const SkPaint* paint = getPaint(reader);
847 const SkBitmap& bitmap = getBitmap(reader); 855 const SkBitmap& bitmap = getBitmap(reader);
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 for (index = 0; index < fRegionCount; index++) 1617 for (index = 0; index < fRegionCount; index++)
1610 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1618 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1611 "region%p, ", &fRegions[index]); 1619 "region%p, ", &fRegions[index]);
1612 if (fRegionCount > 0) 1620 if (fRegionCount > 0)
1613 SkDebugf("%s0};\n", pBuffer); 1621 SkDebugf("%s0};\n", pBuffer);
1614 1622
1615 const_cast<SkPicturePlayback*>(this)->dumpStream(); 1623 const_cast<SkPicturePlayback*>(this)->dumpStream();
1616 } 1624 }
1617 1625
1618 #endif 1626 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698