From 31249bb2df023868e4585f14519bf17c835f8700 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Fri, 17 Mar 2017 17:11:37 +0000 Subject: Revert "Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"" This reverts commit 9e9188f84b15a25e27f63d5f8de3ccd393d9a173. Reason for revert: Android-side fix has landed Original change's description: > Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot" > > This reverts commit b64bcbdc3a5aa7b9e3ff216e4617ddc1db9260b5. > > Reason for revert: > > Android build failed as shown below. > > frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1 > mImage = surface->makeImageSnapshot(SkBudgeted::kNo); > > Original change's description: > > Remove budgeted parameter from SkSurface::makeImageSnapshot > > > > This unused feature complicates MDB. > > > > Chrome compiles locally for me with this CL. > > > > Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72 > > Reviewed-on: https://skia-review.googlesource.com/9734 > > Reviewed-by: Brian Salomon > > Commit-Queue: Robert Phillips > > > > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e > Reviewed-on: https://skia-review.googlesource.com/9788 > Reviewed-by: Yuqian Li > Commit-Queue: Yuqian Li > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,liyuqian@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: If07d1b5db6e6c618d37445a0cf127780ed243a92 Reviewed-on: https://skia-review.googlesource.com/9843 Reviewed-by: Robert Phillips Commit-Queue: Robert Phillips --- src/gpu/GrSurfaceProxy.cpp | 15 --------------- src/gpu/GrSurfaceProxyPriv.h | 12 ------------ 2 files changed, 27 deletions(-) (limited to 'src/gpu') diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp index 727bcb51aa..ac025dcc59 100644 --- a/src/gpu/GrSurfaceProxy.cpp +++ b/src/gpu/GrSurfaceProxy.cpp @@ -290,18 +290,3 @@ sk_sp GrSurfaceProxy::TestCopy(GrContext* context, const GrSur return dstContext; } -void GrSurfaceProxyPriv::makeBudgeted() { - if (fProxy->fTarget) { - fProxy->fTarget->resourcePriv().makeBudgeted(); - } - - fProxy->fBudgeted = SkBudgeted::kYes; -} - -void GrSurfaceProxyPriv::makeUnbudgeted() { - if (fProxy->fTarget) { - fProxy->fTarget->resourcePriv().makeUnbudgeted(); - } - - fProxy->fBudgeted = SkBudgeted::kNo; -} diff --git a/src/gpu/GrSurfaceProxyPriv.h b/src/gpu/GrSurfaceProxyPriv.h index 0d10ef6504..e5a628c1e7 100644 --- a/src/gpu/GrSurfaceProxyPriv.h +++ b/src/gpu/GrSurfaceProxyPriv.h @@ -23,18 +23,6 @@ public: // Don't abuse these two!!!!!!! bool isExact() const { return SkBackingFit::kExact == fProxy->fFit; } - // These next two are very specialized and wacky - don't use them! - - // In the case where an unbudgeted, deferred SkSurface_Gpu has snapped a budgeted, deferred - // SkImage_Gpu, this serves to propagate the budgeting forward in time. For now, and - // presumably forever, this will not change any flushing decisions but may make Ganesh - // appear to have gone over budget. In the case of non-deferred proxies this will immediately - // propagate the budget decision to the resource, which in itself is dubious. - void makeBudgeted(); - // In the case where a budgeted, deferred SkSurface_Gpu has snapped an unbudgeted, deferred - // SkImage_Gpu, this serves to propagate the lack of budgeting forward in time. - void makeUnbudgeted(); - private: explicit GrSurfaceProxyPriv(GrSurfaceProxy* proxy) : fProxy(proxy) {} GrSurfaceProxyPriv(const GrSurfaceProxyPriv&) {} // unimpl -- cgit v1.2.3