Enable basic drawing with SkRecord-based pictures.
I've tagged all the functions in SkPicture.cpp is // fRecord TODO or // fRecord
OK, depending on whether or not they're totally broken when used from an
SkRecord-based picture. Obviously next steps are to eliminate all the TODOs,
then clean up the notes.
I converted SkPicture over to smart pointers too. It's particularly helpful
that the smart pointers initialize to NULL by default.
For now I've got all the SkRecord-based code jammed in at the bottom of the file. I figure it'll help me keep things straight for a bit, then we can rearrange later.
BUG=skia:
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/333823007
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index d0c32eb..8312356 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -474,7 +474,7 @@
GrPaint grPaint;
SkPaint2GrPaintShader(this->context(), paint, true, &grPaint);
-
+
fContext->drawRect(grPaint, rect, &strokeInfo);
}
@@ -487,7 +487,7 @@
GrPaint grPaint;
SkPaint2GrPaintShader(this->context(), paint, true, &grPaint);
-
+
GrStrokeInfo strokeInfo(paint);
if (paint.getMaskFilter()) {
// try to hit the fast path for drawing filtered round rects
@@ -536,7 +536,7 @@
this->drawPath(draw, path, paint, NULL, true);
return;
}
-
+
fContext->drawRRect(grPaint, rect, strokeInfo);
}
@@ -1945,7 +1945,7 @@
const GPUAccelData::SaveLayerInfo& info = gpuData->saveLayerInfo(i);
- if (NULL != picture->fPlayback) {
+ if (NULL != picture->fPlayback.get()) {
SkPicturePlayback::PlaybackReplacements::ReplacementInfo* layerInfo =
replacements.push();
layerInfo->fStart = info.fSaveLayerOpID;