Finish a few MDB TODOs
Change-Id: I5579bea381ce30dc59502dbeb5841fea927002c2 Reviewed-on: https://skia-review.googlesource.com/20640 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
b7fd25241e
commit
81dd3e0c66
@ -206,7 +206,8 @@ void GrRenderTargetOpList::fullClear(const GrCaps& caps, GrColor color) {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// MDB TODO: fuse with GrTextureOpList::copySurface
|
||||
// This closely parallels GrTextureOpList::copySurface but renderTargetOpLists
|
||||
// also store the applied clip and dest proxy with the op
|
||||
bool GrRenderTargetOpList::copySurface(const GrCaps& caps,
|
||||
GrSurfaceProxy* dst,
|
||||
GrSurfaceProxy* src,
|
||||
|
@ -77,7 +77,8 @@ void GrTextureOpList::reset() {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// MDB TODO: fuse with GrRenderTargetOpList::copySurface
|
||||
// This closely parallels GrRenderTargetOpList::copySurface but renderTargetOpList
|
||||
// stores extra data with the op
|
||||
bool GrTextureOpList::copySurface(const GrCaps& caps,
|
||||
GrSurfaceProxy* dst,
|
||||
GrSurfaceProxy* src,
|
||||
|
@ -105,26 +105,9 @@ sk_sp<SkImage> SkSurface_Gpu::onNewImageSnapshot() {
|
||||
// want to ever retarget the SkSurface at another buffer we create. Force a copy now to avoid
|
||||
// copy-on-write.
|
||||
if (!srcProxy || rtc->priv().refsWrappedObjects()) {
|
||||
// MDB TODO: replace this with GrSurfaceProxy::Copy?
|
||||
GrSurfaceDesc desc;
|
||||
desc.fConfig = rtc->config();
|
||||
desc.fWidth = rtc->width();
|
||||
desc.fHeight = rtc->height();
|
||||
desc.fOrigin = rtc->origin();
|
||||
SkASSERT(rtc->origin() == rtc->asSurfaceProxy()->origin());
|
||||
|
||||
sk_sp<GrSurfaceContext> copyCtx = ctx->contextPriv().makeDeferredSurfaceContext(
|
||||
desc,
|
||||
SkBackingFit::kExact,
|
||||
budgeted);
|
||||
if (!copyCtx) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!copyCtx->copy(rtc->asSurfaceProxy())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
srcProxy = copyCtx->asTextureProxyRef();
|
||||
srcProxy = GrSurfaceProxy::Copy(ctx, rtc->asSurfaceProxy(), budgeted);
|
||||
}
|
||||
|
||||
const SkImageInfo info = fDevice->imageInfo();
|
||||
|
@ -9,9 +9,8 @@
|
||||
|
||||
#include "Test.h"
|
||||
|
||||
// MDB TODO: With the move of the discard calls to the RenderTargetContext, deferred RTCs are being
|
||||
// instantiated early. This test can be re-enabled once discards do not force an instantiation
|
||||
// (i.e., when renderTargetProxies carry the op IORefs)
|
||||
// MDB TODO: the early instantiation of the renderTargetContext's backing GrRenderTargetProxy
|
||||
// mixes this test up. Re-enable once backing GPU resources are distributed by MDB at flush time.
|
||||
#if 0
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
@ -50,8 +49,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(RenderTargetContextTest, reporter, ctxInfo) {
|
||||
GrTextureProxy* tProxy = rtCtx->asTextureProxy();
|
||||
REPORTER_ASSERT(reporter, tProxy);
|
||||
|
||||
GrTexture* tex = tProxy->instantiate(ctx->resourceProvider());
|
||||
REPORTER_ASSERT(reporter, tex);
|
||||
REPORTER_ASSERT(reporter, tProxy->instantiate(ctx->resourceProvider()));
|
||||
|
||||
check_is_wrapped_status(reporter, rtCtx.get(), true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user