remove SkPictureUtils.h

BUG=skia:

Change-Id: Iab6e71f347fa34baf442e38ba7773058695f3e6d
Reviewed-on: https://skia-review.googlesource.com/9348
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Mike Reed 2017-03-08 10:39:02 -05:00 committed by Skia Commit-Bot
parent dcd2a908f4
commit 90b2005327
7 changed files with 6 additions and 40 deletions

View File

@ -40,7 +40,6 @@
#include "SkOSFile.h"
#include "SkOSPath.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
#include "SkSVGDOM.h"
#include "SkScan.h"
#include "SkString.h"
@ -714,7 +713,7 @@ public:
SkString name = SkOSPath::Basename(path.c_str());
fSourceType = "skp";
fBenchType = "recording";
fSKPBytes = static_cast<double>(SkPictureUtils::ApproximateBytesUsed(pic.get()));
fSKPBytes = static_cast<double>(pic->approximateBytesUsed());
fSKPOps = pic->approximateOpCount();
return new RecordingBench(name.c_str(), pic.get(), FLAGS_bbh, FLAGS_lite);
}
@ -729,7 +728,7 @@ public:
SkString name = SkOSPath::Basename(path.c_str());
fSourceType = "skp";
fBenchType = "piping";
fSKPBytes = static_cast<double>(SkPictureUtils::ApproximateBytesUsed(pic.get()));
fSKPBytes = static_cast<double>(pic->approximateBytesUsed());
fSKPOps = pic->approximateOpCount();
return new PipingBench(name.c_str(), pic.get());
}

View File

@ -22,7 +22,6 @@ skia_utils_sources = [
"$_include/utils/SkPaintFilterCanvas.h",
"$_include/utils/SkParse.h",
"$_include/utils/SkParsePath.h",
"$_include/utils/SkPictureUtils.h",
"$_include/utils/SkRandom.h",
"$_include/utils/SkShadowUtils.h",
"$_include/utils/SkTextBox.h",

View File

@ -1,28 +0,0 @@
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkPictureUtils_DEFINED
#define SkPictureUtils_DEFINED
#include "SkPicture.h"
// TODO: remove this file?
class SK_API SkPictureUtils {
public:
/**
* How many bytes are allocated to hold the SkPicture.
* Includes operations, parameters, bounding data, deletion listeners;
* includes nested SkPictures, but does not include large objects that
* SkRecord holds a reference to (e.g. paths, or pixels backing bitmaps).
*/
static size_t ApproximateBytesUsed(const SkPicture* pict) {
return pict->approximateBytesUsed();
}
};
#endif

View File

@ -9,7 +9,6 @@
#include "SkData.h"
#include "SkDrawable.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
#include "SkRecord.h"
#include "SkRecordDraw.h"
#include "SkRecordOpts.h"
@ -89,7 +88,7 @@ sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPicture(uint32_t finishFlag
size_t subPictureBytes = fRecorder->approxBytesUsedBySubPictures();
for (int i = 0; pictList && i < pictList->count(); i++) {
subPictureBytes += SkPictureUtils::ApproximateBytesUsed(pictList->begin()[i]);
subPictureBytes += pictList->begin()[i]->approximateBytesUsed();
}
return sk_make_sp<SkBigPicture>(fCullRect, fRecord.release(), pictList, fBBH.release(),
subPictureBytes);

View File

@ -10,7 +10,6 @@
#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
#include "SkRecordedDrawable.h"
#include "SkRecordDraw.h"
@ -34,7 +33,7 @@ SkPicture* SkRecordedDrawable::onNewPictureSnapshot() {
size_t subPictureBytes = 0;
for (int i = 0; pictList && i < pictList->count(); i++) {
subPictureBytes += SkPictureUtils::ApproximateBytesUsed(pictList->begin()[i]);
subPictureBytes += pictList->begin()[i]->approximateBytesUsed();
}
// SkBigPicture will take ownership of a ref on both fRecord and fBBH.
// We're not willing to give up our ownership, so we must ref them for SkPicture.

View File

@ -10,7 +10,6 @@
#include "SkImage.h"
#include "SkPatchUtils.h"
#include "SkPicture.h"
#include "SkPictureUtils.h"
#include "SkRecorder.h"
#include "SkSurface.h"
@ -301,7 +300,7 @@ void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, const SkPaint* paint) {
if (fDrawPictureMode == Record_DrawPictureMode) {
fApproxBytesUsedBySubPictures += SkPictureUtils::ApproximateBytesUsed(pic);
fApproxBytesUsedBySubPictures += pic->approximateBytesUsed();
APPEND(DrawPicture, this->copy(paint), sk_ref_sp(pic), matrix ? *matrix : SkMatrix::I());
} else {
SkASSERT(fDrawPictureMode == Playback_DrawPictureMode);
@ -313,7 +312,7 @@ void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con
void SkRecorder::onDrawShadowedPicture(const SkPicture* pic, const SkMatrix* matrix,
const SkPaint* paint, const SkShadowParams& params) {
if (fDrawPictureMode == Record_DrawPictureMode) {
fApproxBytesUsedBySubPictures += SkPictureUtils::ApproximateBytesUsed(pic);
fApproxBytesUsedBySubPictures += pic->approximateBytesUsed();
APPEND(DrawShadowedPicture, this->copy(paint),
sk_ref_sp(pic),
matrix ? *matrix : SkMatrix::I(),

View File

@ -21,7 +21,6 @@
#include "SkPicture.h"
#include "SkPictureAnalyzer.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
#include "SkPixelRef.h"
#include "SkPixelSerializer.h"
#include "SkMiniRecorder.h"