#include "GrPictureUtils.h"
#include "SkDevice.h"
-// The GrGather device performs GPU-backend-specific preprocessing on
+// The GrGather device performs GPU-backend-specific preprocessing on
// a picture. The results are stored in a GPUAccelData.
//
// Currently the only interesting work is done in drawDevice (i.e., when a
fInfo.fRestoreOpID = 0;
fInfo.fHasNestedLayers = false;
- fEmptyBitmap.setConfig(SkImageInfo::Make(fInfo.fSize.fWidth,
+ fEmptyBitmap.setConfig(SkImageInfo::Make(fInfo.fSize.fWidth,
fInfo.fSize.fHeight,
kUnknown_SkColorType,
kIgnore_SkAlphaType));
// GrGatherDevice dev(w, h, picture, accelData);
// GrGatherCanvas canvas(..., picture);
// canvas.gather();
-//
-// which is all just to fill in 'accelData'
+//
+// which is all just to fill in 'accelData'
class SK_API GrGatherCanvas : public SkCanvas {
public:
- GrGatherCanvas(GrGatherDevice* device, SkPicture* pict)
+ GrGatherCanvas(GrGatherDevice* device, SkPicture* pict)
: INHERITED(device)
, fPicture(pict) {
}
typedef SkCanvas INHERITED;
};
-// GatherGPUInfo is only intended to be called within the context of SkGpuDevice's
-// EXPERIMENTAL_optimize method.
+// GatherGPUInfo is only intended to be called within the context of SkGpuDevice's
+// EXPERIMENTAL_optimize method.
void GatherGPUInfo(SkPicture* pict, GPUAccelData* accelData) {
if (0 == pict->width() || 0 == pict->height()) {
return ;
canvas.gather();
}
-
for (int i = 0; i < gpuData->numSaveLayers(); ++i) {
const GPUAccelData::SaveLayerInfo& info = gpuData->saveLayerInfo(i);
- SkDebugf("%d: Width: %d Height: %d SL: %d R: %d hasNestedLayers: %s\n",
+ SkDebugf("%d: Width: %d Height: %d SL: %d R: %d hasNestedLayers: %s\n",
i,
- info.fSize.fWidth,
- info.fSize.fHeight,
- info.fSaveLayerOpID,
- info.fRestoreOpID,
+ info.fSize.fWidth,
+ info.fSize.fHeight,
+ info.fSaveLayerOpID,
+ info.fRestoreOpID,
info.fHasNestedLayers ? "T" : "F");
}
gPrintedAccelData = true;