aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-31 16:24:08 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-31 16:24:08 +0000
commit081560e3abe25c4821b79ca1465f4dbd371c4b5c (patch)
treec6b87adb0a09e54eee77ba3363956738a1b7967f /src/utils
parent94bdd7e3fcf493f827263bd922cb09fb4b50df4c (diff)
add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning
BUG= R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org Review URL: https://codereview.chromium.org/51033004 git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkCanvasStateUtils.cpp6
-rw-r--r--src/utils/debugger/SkDebugCanvas.h2
-rw-r--r--src/utils/debugger/SkObjectParser.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp
index c62bc04e11..9c7d8fab3a 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.
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index 7d1166286a..3df31513b4 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -109,8 +109,8 @@ public:
/**
Returns the vector of draw commands
- DEPRECATED: please use getDrawCommandAt and getSize instead
*/
+ SK_ATTR_DEPRECATED("please use getDrawCommandAt and getSize instead")
const SkTDArray<SkDrawCommand*>& getDrawCommands() const;
/**
diff --git a/src/utils/debugger/SkObjectParser.cpp b/src/utils/debugger/SkObjectParser.cpp
index 9dd77c0d73..107e04a258 100644
--- a/src/utils/debugger/SkObjectParser.cpp
+++ b/src/utils/debugger/SkObjectParser.cpp
@@ -31,7 +31,7 @@ SkString* SkObjectParser::BitmapToString(const SkBitmap& bitmap) {
SkASSERT(SkBitmap::kConfigCount == 7);
mBitmap->append(" Config: ");
- mBitmap->append(gConfigStrings[bitmap.getConfig()]);
+ mBitmap->append(gConfigStrings[bitmap.config()]);
if (bitmap.isOpaque()) {
mBitmap->append(" opaque");