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

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

Issue 174243003: add SkCanvas::drawDRRect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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/SkPictureFlat.h ('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 /* 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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 canvas.drawBitmapNine(bitmap, src, dst, paint); 903 canvas.drawBitmapNine(bitmap, src, dst, paint);
904 } break; 904 } break;
905 case DRAW_CLEAR: 905 case DRAW_CLEAR:
906 canvas.clear(reader.readInt()); 906 canvas.clear(reader.readInt());
907 break; 907 break;
908 case DRAW_DATA: { 908 case DRAW_DATA: {
909 size_t length = reader.readInt(); 909 size_t length = reader.readInt();
910 canvas.drawData(reader.skip(length), length); 910 canvas.drawData(reader.skip(length), length);
911 // skip handles padding the read out to a multiple of 4 911 // skip handles padding the read out to a multiple of 4
912 } break; 912 } break;
913 case DRAW_DRRECT: {
914 const SkPaint& paint = *getPaint(reader);
915 SkRRect outer, inner;
916 reader.readRRect(&outer);
917 reader.readRRect(&inner);
918 canvas.drawDRRect(outer, inner, paint);
919 } break;
913 case BEGIN_COMMENT_GROUP: { 920 case BEGIN_COMMENT_GROUP: {
914 const char* desc = reader.readString(); 921 const char* desc = reader.readString();
915 canvas.beginCommentGroup(desc); 922 canvas.beginCommentGroup(desc);
916 } break; 923 } break;
917 case COMMENT: { 924 case COMMENT: {
918 const char* kywd = reader.readString(); 925 const char* kywd = reader.readString();
919 const char* value = reader.readString(); 926 const char* value = reader.readString();
920 canvas.addComment(kywd, value); 927 canvas.addComment(kywd, value);
921 } break; 928 } break;
922 case END_COMMENT_GROUP: { 929 case END_COMMENT_GROUP: {
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 for (index = 0; index < fPictureCount; index++) 1637 for (index = 0; index < fPictureCount; index++)
1631 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1638 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1632 "picture%p, ", fPictureRefs[index]); 1639 "picture%p, ", fPictureRefs[index]);
1633 if (fPictureCount > 0) 1640 if (fPictureCount > 0)
1634 SkDebugf("%s0};\n", pBuffer); 1641 SkDebugf("%s0};\n", pBuffer);
1635 1642
1636 const_cast<SkPicturePlayback*>(this)->dumpStream(); 1643 const_cast<SkPicturePlayback*>(this)->dumpStream();
1637 } 1644 }
1638 1645
1639 #endif 1646 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698