Unblock DEPS roll by remove SkAutoTUnref from GrDrawContext
BUG=skia: Review URL: https://codereview.chromium.org/1156103006
This commit is contained in:
parent
b97e909151
commit
4b195e5d8f
@ -226,6 +226,7 @@ private:
|
||||
friend class GrContext; // for ctor
|
||||
|
||||
GrDrawContext(GrContext* context, GrDrawTarget* drawTarget);
|
||||
~GrDrawContext() override;
|
||||
|
||||
// Sets the paint. Returns true on success; false on failure.
|
||||
bool prepareToDraw(GrPipelineBuilder*,
|
||||
@ -245,8 +246,8 @@ private:
|
||||
const SkPath&,
|
||||
const GrStrokeInfo&);
|
||||
|
||||
GrContext* fContext; // owning context -> no ref
|
||||
SkAutoTUnref<GrDrawTarget> fDrawTarget;
|
||||
GrContext* fContext; // owning context -> no ref
|
||||
GrDrawTarget* fDrawTarget;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -78,7 +78,7 @@ GrContext::DrawingMgr::~DrawingMgr() {
|
||||
|
||||
void GrContext::DrawingMgr::abandon() {
|
||||
SkSafeSetNull(fDrawTarget);
|
||||
fDrawContext->fDrawTarget.reset(NULL);
|
||||
SkSafeSetNull(fDrawContext->fDrawTarget);
|
||||
SkSafeSetNull(fDrawContext);
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,10 @@ GrDrawContext::GrDrawContext(GrContext* context, GrDrawTarget* drawTarget)
|
||||
, fDrawTarget(SkRef(drawTarget)) {
|
||||
}
|
||||
|
||||
GrDrawContext::~GrDrawContext() {
|
||||
SkSafeUnref(fDrawTarget);
|
||||
}
|
||||
|
||||
void GrDrawContext::copySurface(GrRenderTarget* dst, GrSurface* src,
|
||||
const SkIRect& srcRect, const SkIPoint& dstPoint) {
|
||||
if (!this->prepareToDraw(dst)) {
|
||||
|
Loading…
Reference in New Issue
Block a user