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:
parent
4897fb898f
commit
2a83603541
@ -20,7 +20,6 @@ class SkDrawFilter;
|
|||||||
class SkImageFilterCache;
|
class SkImageFilterCache;
|
||||||
struct SkIRect;
|
struct SkIRect;
|
||||||
class SkMatrix;
|
class SkMatrix;
|
||||||
class SkMetaData;
|
|
||||||
class SkRasterHandleAllocator;
|
class SkRasterHandleAllocator;
|
||||||
class SkRegion;
|
class SkRegion;
|
||||||
class SkSpecialImage;
|
class SkSpecialImage;
|
||||||
@ -34,8 +33,6 @@ public:
|
|||||||
explicit SkBaseDevice(const SkImageInfo&, const SkSurfaceProps&);
|
explicit SkBaseDevice(const SkImageInfo&, const SkSurfaceProps&);
|
||||||
virtual ~SkBaseDevice();
|
virtual ~SkBaseDevice();
|
||||||
|
|
||||||
SkMetaData& getMetaData();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return ImageInfo for this device. If the canvas is not backed by pixels
|
* 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.
|
* (cpu or gpu), then the info's ColorType will be kUnknown_SkColorType.
|
||||||
@ -368,8 +365,7 @@ private:
|
|||||||
const SkRect& dst, const SkPaint& paint,
|
const SkRect& dst, const SkPaint& paint,
|
||||||
SkCanvas::SrcRectConstraint constraint);
|
SkCanvas::SrcRectConstraint constraint);
|
||||||
|
|
||||||
SkIPoint fOrigin;
|
SkIPoint fOrigin;
|
||||||
SkMetaData* fMetaData;
|
|
||||||
const SkImageInfo fInfo;
|
const SkImageInfo fInfo;
|
||||||
const SkSurfaceProps fSurfaceProps;
|
const SkSurfaceProps fSurfaceProps;
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "SkImageFilterCache.h"
|
#include "SkImageFilterCache.h"
|
||||||
#include "SkImagePriv.h"
|
#include "SkImagePriv.h"
|
||||||
#include "SkLatticeIter.h"
|
#include "SkLatticeIter.h"
|
||||||
#include "SkMetaData.h"
|
|
||||||
#include "SkPatchUtils.h"
|
#include "SkPatchUtils.h"
|
||||||
#include "SkPathPriv.h"
|
#include "SkPathPriv.h"
|
||||||
#include "SkPathMeasure.h"
|
#include "SkPathMeasure.h"
|
||||||
@ -32,19 +31,9 @@ SkBaseDevice::SkBaseDevice(const SkImageInfo& info, const SkSurfaceProps& surfac
|
|||||||
, fSurfaceProps(surfaceProps)
|
, fSurfaceProps(surfaceProps)
|
||||||
{
|
{
|
||||||
fOrigin.setZero();
|
fOrigin.setZero();
|
||||||
fMetaData = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SkBaseDevice::~SkBaseDevice() { delete fMetaData; }
|
SkBaseDevice::~SkBaseDevice() {}
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP
|
#ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP
|
||||||
const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) {
|
const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) {
|
||||||
|
Loading…
Reference in New Issue
Block a user