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

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

Issue 113873008: remove unused SkFixed and SkFract functions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 if (translateX != defaultMatrix.getTranslateX()) 1210 if (translateX != defaultMatrix.getTranslateX())
1211 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1211 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1212 "{kTranslateX, %g}, ", SkScalarToFloat(translateX)); 1212 "{kTranslateX, %g}, ", SkScalarToFloat(translateX));
1213 SkScalar translateY = matrix.getTranslateY(); 1213 SkScalar translateY = matrix.getTranslateY();
1214 if (translateY != defaultMatrix.getTranslateY()) 1214 if (translateY != defaultMatrix.getTranslateY())
1215 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1215 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1216 "{kTranslateY, %g}, ", SkScalarToFloat(translateY)); 1216 "{kTranslateY, %g}, ", SkScalarToFloat(translateY));
1217 SkScalar perspX = matrix.getPerspX(); 1217 SkScalar perspX = matrix.getPerspX();
1218 if (perspX != defaultMatrix.getPerspX()) 1218 if (perspX != defaultMatrix.getPerspX())
1219 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1219 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1220 "{kPerspX, %g}, ", SkFractToFloat(perspX)); 1220 "{kPerspX, %g}, ", perspX);
1221 SkScalar perspY = matrix.getPerspY(); 1221 SkScalar perspY = matrix.getPerspY();
1222 if (perspY != defaultMatrix.getPerspY()) 1222 if (perspY != defaultMatrix.getPerspY())
1223 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1223 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1224 "{kPerspY, %g}, ", SkFractToFloat(perspY)); 1224 "{kPerspY, %g}, ", perspY);
1225 SkDebugf("%s{0}};\n", pBuffer); 1225 SkDebugf("%s{0}};\n", pBuffer);
1226 } 1226 }
1227 1227
1228 void dumpPaint(const SkPaint& paint) const { 1228 void dumpPaint(const SkPaint& paint) const {
1229 SkPaint defaultPaint; 1229 SkPaint defaultPaint;
1230 char pBuffer[DUMP_BUFFER_SIZE]; 1230 char pBuffer[DUMP_BUFFER_SIZE];
1231 char* bufferPtr = pBuffer; 1231 char* bufferPtr = pBuffer;
1232 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer), 1232 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer),
1233 "PaintPointers paintPtrs%p = {", &paint); 1233 "PaintPointers paintPtrs%p = {", &paint);
1234 const SkTypeface* typeface = paint.getTypeface(); 1234 const SkTypeface* typeface = paint.getTypeface();
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 for (index = 0; index < fRegionCount; index++) 1659 for (index = 0; index < fRegionCount; index++)
1660 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1660 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1661 "region%p, ", &fRegions[index]); 1661 "region%p, ", &fRegions[index]);
1662 if (fRegionCount > 0) 1662 if (fRegionCount > 0)
1663 SkDebugf("%s0};\n", pBuffer); 1663 SkDebugf("%s0};\n", pBuffer);
1664 1664
1665 const_cast<SkPicturePlayback*>(this)->dumpStream(); 1665 const_cast<SkPicturePlayback*>(this)->dumpStream();
1666 } 1666 }
1667 1667
1668 #endif 1668 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698