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

Unified Diff: src/utils/SkCanvasStateUtils.cpp

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkImageDecoder_CG.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkCanvasStateUtils.cpp
diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp
index c62bc04e11a0bbcbf2f60a0c4d92b3f3f188af11..9c7d8fab3a10c9775dd71f2d82279920984348a0 100644
--- a/src/utils/SkCanvasStateUtils.cpp
+++ b/src/utils/SkCanvasStateUtils.cpp
@@ -171,7 +171,7 @@ static void setup_MC_state(SkMCState* state, const SkMatrix& matrix, const SkReg
}
// allocate memory for the clip then and copy them to the struct
- state->clipRects = (ClipRect*) sk_malloc_throw(clipWriter.size());
+ state->clipRects = (ClipRect*) sk_malloc_throw(clipWriter.bytesWritten());
clipWriter.flatten(state->clipRects);
}
@@ -239,9 +239,9 @@ SkCanvasState* SkCanvasStateUtils::CaptureCanvasState(SkCanvas* canvas) {
}
// allocate memory for the layers and then and copy them to the struct
- SkASSERT(layerWriter.size() == layerCount * sizeof(SkCanvasLayerState));
+ SkASSERT(layerWriter.bytesWritten() == layerCount * sizeof(SkCanvasLayerState));
canvasState->layerCount = layerCount;
- canvasState->layers = (SkCanvasLayerState*) sk_malloc_throw(layerWriter.size());
+ canvasState->layers = (SkCanvasLayerState*) sk_malloc_throw(layerWriter.bytesWritten());
layerWriter.flatten(canvasState->layers);
// for now, just ignore any client supplied DrawFilter.
« no previous file with comments | « src/ports/SkImageDecoder_CG.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698