remove metadata from device

BUG=skia:

Change-Id: I46eaea4ddc103bb490b327a52fc5b3ce592c6670
Reviewed-on: https://skia-review.googlesource.com/7240
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2017-01-18 20:10:03 -05:00 committed by Skia Commit-Bot
parent 4897fb898f
commit 2a83603541
2 changed files with 2 additions and 17 deletions

View File

@ -20,7 +20,6 @@ class SkDrawFilter;
class SkImageFilterCache;
struct SkIRect;
class SkMatrix;
class SkMetaData;
class SkRasterHandleAllocator;
class SkRegion;
class SkSpecialImage;
@ -34,8 +33,6 @@ public:
explicit SkBaseDevice(const SkImageInfo&, const SkSurfaceProps&);
virtual ~SkBaseDevice();
SkMetaData& getMetaData();
/**
* Return ImageInfo for this device. If the canvas is not backed by pixels
* (cpu or gpu), then the info's ColorType will be kUnknown_SkColorType.
@ -368,8 +365,7 @@ private:
const SkRect& dst, const SkPaint& paint,
SkCanvas::SrcRectConstraint constraint);
SkIPoint fOrigin;
SkMetaData* fMetaData;
SkIPoint fOrigin;
const SkImageInfo fInfo;
const SkSurfaceProps fSurfaceProps;

View File

@ -15,7 +15,6 @@
#include "SkImageFilterCache.h"
#include "SkImagePriv.h"
#include "SkLatticeIter.h"
#include "SkMetaData.h"
#include "SkPatchUtils.h"
#include "SkPathPriv.h"
#include "SkPathMeasure.h"
@ -32,19 +31,9 @@ SkBaseDevice::SkBaseDevice(const SkImageInfo& info, const SkSurfaceProps& surfac
, fSurfaceProps(surfaceProps)
{
fOrigin.setZero();
fMetaData = nullptr;
}
SkBaseDevice::~SkBaseDevice() { delete fMetaData; }
SkMetaData& SkBaseDevice::getMetaData() {
// metadata users are rare, so we lazily allocate it. If that changes we
// can decide to just make it a field in the device (rather than a ptr)
if (nullptr == fMetaData) {
fMetaData = new SkMetaData;
}
return *fMetaData;
}
SkBaseDevice::~SkBaseDevice() {}
#ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP
const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) {