Revert "Reland "Create updateResourceLabel method.""
This reverts commit35ef74b7a4
. Reason for revert: causing chrome roll failure? Original change's description: > Reland "Create updateResourceLabel method." > > This is a reland of commit605f92c7d7
> > Original change's description: > > Create updateResourceLabel method. > > > > In this CL, the GrSurfaceProxy's and GrDrawOpAtlas's label strings > > are plumbed so that it can be stored in the label string of > > GrGpuResource. updateResourceLabel method, which is called from > > setLabel method, will add labels to Skia OpenGL backend using ANGLE's > > labeling API. > > > > Bug: chromium:1164111 > > Change-Id: I370715d186357e920d260d624d77586cdddd11e8 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541230 > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Bug: chromium:1164111 > Change-Id: Ia20a81d22e320813cbc4ad1d41e06e47dc3827bb > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544058 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> Bug: chromium:1164111 Change-Id: Icacb3a0f2f2ee03afc09e03c2ee59b03d5bdd811 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544241 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Tyler Denniston <tdenniston@google.com>
This commit is contained in:
parent
89f4bd44ed
commit
6a67f1f40f
@ -86,8 +86,7 @@ bool BaseDevice::replaceBackingProxy(SkSurface::ContentChangeMode mode) {
|
||||
oldView.mipmapped(),
|
||||
SkBackingFit::kExact,
|
||||
oldRTP->isBudgeted(),
|
||||
GrProtected::kNo,
|
||||
/*label=*/{});
|
||||
GrProtected::kNo);
|
||||
if (!proxy) {
|
||||
return false;
|
||||
}
|
||||
|
@ -477,17 +477,10 @@ bool GrDrawOpAtlas::createPages(
|
||||
if (GrColorTypeIsAlphaOnly(grColorType)) {
|
||||
swizzle = skgpu::Swizzle::Concat(swizzle, skgpu::Swizzle("aaaa"));
|
||||
}
|
||||
sk_sp<GrSurfaceProxy> proxy = proxyProvider->createProxy(fFormat,
|
||||
dims,
|
||||
GrRenderable::kNo,
|
||||
1,
|
||||
GrMipmapped::kNo,
|
||||
SkBackingFit::kExact,
|
||||
SkBudgeted::kYes,
|
||||
GrProtected::kNo,
|
||||
fLabel,
|
||||
GrInternalSurfaceFlags::kNone,
|
||||
GrSurfaceProxy::UseAllocator::kNo);
|
||||
sk_sp<GrSurfaceProxy> proxy = proxyProvider->createProxy(
|
||||
fFormat, dims, GrRenderable::kNo, 1, GrMipmapped::kNo, SkBackingFit::kExact,
|
||||
SkBudgeted::kYes, GrProtected::kNo, GrInternalSurfaceFlags::kNone,
|
||||
GrSurfaceProxy::UseAllocator::kNo);
|
||||
if (!proxy) {
|
||||
return false;
|
||||
}
|
||||
|
@ -48,8 +48,6 @@ void GrGpu::initCapsAndCompiler(sk_sp<const GrCaps> caps) {
|
||||
|
||||
void GrGpu::disconnect(DisconnectType type) {}
|
||||
|
||||
void GrGpu::updateResourceLabel(GrGpuResource* gpu) {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static bool validate_texel_levels(SkISize dimensions, GrColorType texelColorType,
|
||||
|
@ -88,8 +88,6 @@ public:
|
||||
// into an unrecoverable, lost state.
|
||||
virtual bool isDeviceLost() const { return false; }
|
||||
|
||||
virtual void updateResourceLabel(GrGpuResource*);
|
||||
|
||||
/**
|
||||
* The GrGpu object normally assumes that no outsider is setting state
|
||||
* within the underlying 3D API's context/device/whatever. This call informs
|
||||
|
@ -67,11 +67,6 @@ void GrGpuResource::abandon() {
|
||||
fGpuMemorySize = 0;
|
||||
}
|
||||
|
||||
void GrGpuResource::setLabel(std::string_view label) {
|
||||
fLabel = label;
|
||||
this->getGpu()->updateResourceLabel(this);
|
||||
}
|
||||
|
||||
void GrGpuResource::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
|
||||
if (this->fRefsWrappedObjects && !traceMemoryDump->shouldDumpWrappedObjects()) {
|
||||
return;
|
||||
|
@ -174,9 +174,9 @@ public:
|
||||
associated unique key. */
|
||||
const skgpu::UniqueKey& getUniqueKey() const { return fUniqueKey; }
|
||||
|
||||
std::string getLabel() const { return fLabel; }
|
||||
std::string_view getLabel() const { return fLabel; }
|
||||
|
||||
void setLabel(std::string_view label);
|
||||
void setLabel(std::string_view label) { fLabel = label; }
|
||||
|
||||
/**
|
||||
* Internal-only helper class used for manipulations of the resource by the cache.
|
||||
|
@ -443,7 +443,6 @@ sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrBackendFormat& format
|
||||
SkBackingFit fit,
|
||||
SkBudgeted budgeted,
|
||||
GrProtected isProtected,
|
||||
std::string_view label,
|
||||
GrInternalSurfaceFlags surfaceFlags,
|
||||
GrSurfaceProxy::UseAllocator useAllocator) {
|
||||
ASSERT_SINGLE_OWNER
|
||||
@ -495,7 +494,7 @@ sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrBackendFormat& format
|
||||
surfaceFlags | extraFlags,
|
||||
useAllocator,
|
||||
this->isDDLProvider(),
|
||||
label));
|
||||
{}));
|
||||
}
|
||||
|
||||
return sk_sp<GrTextureProxy>(new GrTextureProxy(format,
|
||||
@ -508,7 +507,7 @@ sk_sp<GrTextureProxy> GrProxyProvider::createProxy(const GrBackendFormat& format
|
||||
surfaceFlags,
|
||||
useAllocator,
|
||||
this->isDDLProvider(),
|
||||
label));
|
||||
{}));
|
||||
}
|
||||
|
||||
sk_sp<GrTextureProxy> GrProxyProvider::createCompressedTextureProxy(
|
||||
|
@ -91,7 +91,6 @@ public:
|
||||
SkBackingFit,
|
||||
SkBudgeted,
|
||||
GrProtected,
|
||||
std::string_view label,
|
||||
GrInternalSurfaceFlags = GrInternalSurfaceFlags::kNone,
|
||||
UseAllocator useAllocator = UseAllocator::kYes);
|
||||
|
||||
|
@ -135,8 +135,7 @@ std::unique_ptr<skgpu::SurfaceContext> GrRecordingContextPriv::makeSC(const GrIm
|
||||
mipmapped,
|
||||
fit,
|
||||
budgeted,
|
||||
isProtected,
|
||||
/*label=*/{});
|
||||
isProtected);
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -182,8 +181,7 @@ std::unique_ptr<skgpu::SurfaceFillContext> GrRecordingContextPriv::makeSFC(GrIma
|
||||
mipmapped,
|
||||
fit,
|
||||
budgeted,
|
||||
isProtected,
|
||||
/*label=*/{});
|
||||
isProtected);
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -245,8 +243,7 @@ std::unique_ptr<skgpu::SurfaceFillContext> GrRecordingContextPriv::makeSFC(
|
||||
mipmapped,
|
||||
fit,
|
||||
budgeted,
|
||||
isProtected,
|
||||
/*label=*/{});
|
||||
isProtected);
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(SkISize dimensions,
|
||||
tempColorType,
|
||||
tmpTexels.get(),
|
||||
numMipLevels,
|
||||
/*label=*/label);
|
||||
/*label=*/{});
|
||||
}
|
||||
|
||||
sk_sp<GrTexture> GrResourceProvider::getExactScratch(SkISize dimensions,
|
||||
@ -168,7 +168,7 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(SkISize dimensions,
|
||||
renderable,
|
||||
renderTargetSampleCnt,
|
||||
isProtected,
|
||||
/*label=*/label);
|
||||
/*label=*/{});
|
||||
if (!tex) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -184,7 +184,7 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(SkISize dimensions,
|
||||
GrMipmapped::kNo,
|
||||
isProtected,
|
||||
&mipLevel,
|
||||
/*label=*/label);
|
||||
/*label=*/{});
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,7 +323,7 @@ sk_sp<GrTexture> GrResourceProvider::createApproxTexture(SkISize dimensions,
|
||||
GrMipmapped::kNo,
|
||||
SkBudgeted::kYes,
|
||||
isProtected,
|
||||
/*label=*/label);
|
||||
/*label=*/{});
|
||||
}
|
||||
|
||||
sk_sp<GrTexture> GrResourceProvider::findAndRefScratchTexture(const skgpu::ScratchKey& key,
|
||||
|
@ -124,7 +124,7 @@ sk_sp<GrSurface> GrSurfaceProxy::createSurfaceImpl(GrResourceProvider* resourceP
|
||||
renderable,
|
||||
sampleCnt,
|
||||
fIsProtected,
|
||||
/*label=*/fLabel);
|
||||
/*label=*/{});
|
||||
} else {
|
||||
surface = resourceProvider->createTexture(fDimensions,
|
||||
fFormat,
|
||||
@ -134,7 +134,7 @@ sk_sp<GrSurface> GrSurfaceProxy::createSurfaceImpl(GrResourceProvider* resourceP
|
||||
mipmapped,
|
||||
fBudgeted,
|
||||
fIsProtected,
|
||||
/*label=*/fLabel);
|
||||
/*label=*/{});
|
||||
}
|
||||
if (!surface) {
|
||||
return nullptr;
|
||||
|
@ -425,8 +425,7 @@ bool SurfaceContext::internalWritePixels(GrDirectContext* dContext,
|
||||
GrMipmapped::kNo,
|
||||
SkBackingFit::kApprox,
|
||||
SkBudgeted::kYes,
|
||||
GrProtected::kNo,
|
||||
/*label=*/{});
|
||||
GrProtected::kNo);
|
||||
if (!tempProxy) {
|
||||
return false;
|
||||
}
|
||||
|
@ -511,15 +511,6 @@ void GrGLGpu::disconnect(DisconnectType type) {
|
||||
fFinishCallbacks.callAll(/* doDelete */ DisconnectType::kCleanup == type);
|
||||
}
|
||||
|
||||
void GrGLGpu::updateResourceLabel(GrGpuResource* gpu) {
|
||||
if (this->glCaps().debugSupport()) {
|
||||
const std::string label = "Skia_" + gpu->getLabel();
|
||||
GrGLuint id = 0;
|
||||
GL_CALL(GenTextures(1, &id));
|
||||
GR_GL_CALL(this->glInterface(), ObjectLabel(GR_GL_TEXTURE, id, -1, label.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
GrThreadSafePipelineBuilder* GrGLGpu::pipelineBuilder() {
|
||||
return fProgramCache.get();
|
||||
}
|
||||
|
@ -40,8 +40,6 @@ public:
|
||||
|
||||
void disconnect(DisconnectType) override;
|
||||
|
||||
void updateResourceLabel(GrGpuResource*) override;
|
||||
|
||||
GrThreadSafePipelineBuilder* pipelineBuilder() override;
|
||||
sk_sp<GrThreadSafePipelineBuilder> refPipelineBuilder() override;
|
||||
|
||||
|
@ -477,8 +477,7 @@ GR_DRAW_OP_TEST_DEFINE(NonAALatticeOp) {
|
||||
GrMipmapped::kNo,
|
||||
SkBackingFit::kExact,
|
||||
SkBudgeted::kYes,
|
||||
GrProtected::kNo,
|
||||
/*label=*/{});
|
||||
GrProtected::kNo);
|
||||
|
||||
do {
|
||||
if (random->nextBool()) {
|
||||
|
@ -94,7 +94,7 @@ GrSurfaceProxyView make_deferred_mask_texture_view(GrRecordingContext* rContext,
|
||||
|
||||
auto proxy =
|
||||
proxyProvider->createProxy(format, dimensions, GrRenderable::kNo, 1, GrMipmapped::kNo,
|
||||
fit, SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
fit, SkBudgeted::kYes, GrProtected::kNo);
|
||||
return {std::move(proxy), kTopLeft_GrSurfaceOrigin, swizzle};
|
||||
}
|
||||
|
||||
|
@ -1402,16 +1402,9 @@ GR_DRAW_OP_TEST_DEFINE(TextureOpImpl) {
|
||||
context->priv().caps()->getDefaultBackendFormat(GrColorType::kRGBA_8888,
|
||||
GrRenderable::kNo);
|
||||
GrProxyProvider* proxyProvider = context->priv().proxyProvider();
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(format,
|
||||
dims,
|
||||
GrRenderable::kNo,
|
||||
1,
|
||||
mipmapped,
|
||||
fit,
|
||||
SkBudgeted::kNo,
|
||||
GrProtected::kNo,
|
||||
/*label=*/{},
|
||||
GrInternalSurfaceFlags::kNone);
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
|
||||
format, dims, GrRenderable::kNo, 1, mipmapped, fit, SkBudgeted::kNo, GrProtected::kNo,
|
||||
GrInternalSurfaceFlags::kNone);
|
||||
|
||||
SkRect rect = GrTest::TestRect(random);
|
||||
SkRect srcRect;
|
||||
|
@ -328,7 +328,7 @@ GrSurfaceProxyView render_sw_mask(GrRecordingContext* context,
|
||||
GrColorType::kAlpha_8);
|
||||
auto proxy = proxyProvider->createProxy(format, bounds.size(), GrRenderable::kNo, 1,
|
||||
GrMipmapped::kNo, SkBackingFit::kApprox,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
|
||||
// Since this will be rendered on another thread, make a copy of the elements in case
|
||||
// the clip stack is modified on the main thread
|
||||
|
@ -181,8 +181,7 @@ std::unique_ptr<SurfaceDrawContext> SurfaceDrawContext::Make(
|
||||
mipmapped,
|
||||
fit,
|
||||
budgeted,
|
||||
isProtected,
|
||||
/*label=*/{});
|
||||
isProtected);
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -227,8 +226,7 @@ std::unique_ptr<SurfaceDrawContext> SurfaceDrawContext::Make(
|
||||
mipmapped,
|
||||
fit,
|
||||
budgeted,
|
||||
isProtected,
|
||||
/*label=*/{});
|
||||
isProtected);
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ static sk_sp<GrSurfaceProxy> create_proxy(GrRecordingContext* rContext) {
|
||||
GrRenderable::kYes);
|
||||
return rContext->priv().proxyProvider()->createProxy(
|
||||
format, kDimensions, GrRenderable::kYes, 1, GrMipmapped::kNo, SkBackingFit::kExact,
|
||||
SkBudgeted::kNo, GrProtected::kNo, /*label=*/{}, GrInternalSurfaceFlags::kNone);
|
||||
SkBudgeted::kNo, GrProtected::kNo, GrInternalSurfaceFlags::kNone);
|
||||
}
|
||||
|
||||
typedef GrQuadAAFlags (*PerQuadAAFunc)(int i);
|
||||
|
@ -383,8 +383,7 @@ static std::unique_ptr<skgpu::v1::SurfaceDrawContext> draw_mipmap_into_new_rende
|
||||
GrMipmapped::kNo,
|
||||
SkBackingFit::kApprox,
|
||||
SkBudgeted::kYes,
|
||||
GrProtected::kNo,
|
||||
/*label=*/{});
|
||||
GrProtected::kNo);
|
||||
|
||||
auto sdc = skgpu::v1::SurfaceDrawContext::Make(rContext,
|
||||
colorType,
|
||||
@ -440,7 +439,7 @@ DEF_GPUTEST(GrManyDependentsMipMappedTest, reporter, /* options */) {
|
||||
|
||||
sk_sp<GrTextureProxy> mipmapProxy = proxyProvider->createProxy(
|
||||
format, {4, 4}, GrRenderable::kYes, 1, GrMipmapped::kYes, SkBackingFit::kExact,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
|
||||
// Mark the mipmaps clean to ensure things still work properly when they won't be marked
|
||||
// dirty again until GrRenderTask::makeClosed().
|
||||
|
@ -167,7 +167,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) {
|
||||
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
|
||||
combo.fFormat, kDims, GrRenderable::kNo, 1, GrMipmapped::kYes,
|
||||
SkBackingFit::kExact, SkBudgeted::kNo, GrProtected::kNo, /*label=*/{});
|
||||
SkBackingFit::kExact, SkBudgeted::kNo, GrProtected::kNo);
|
||||
REPORTER_ASSERT(reporter, SkToBool(proxy.get()) == expectedMipMapability,
|
||||
"ct:%s format:%s, tex:%d, expectedMipMapability:%d",
|
||||
GrColorTypeToStr(combo.fColorType), combo.fFormat.toStr().c_str(),
|
||||
|
@ -183,7 +183,7 @@ DEF_GPUTEST(OpChainTest, reporter, /*ctxInfo*/) {
|
||||
static const GrSurfaceOrigin kOrigin = kTopLeft_GrSurfaceOrigin;
|
||||
auto proxy = dContext->priv().proxyProvider()->createProxy(
|
||||
format, kDims, GrRenderable::kYes, 1, GrMipmapped::kNo, SkBackingFit::kExact,
|
||||
SkBudgeted::kNo, GrProtected::kNo, /*label=*/{}, GrInternalSurfaceFlags::kNone);
|
||||
SkBudgeted::kNo, GrProtected::kNo, GrInternalSurfaceFlags::kNone);
|
||||
SkASSERT(proxy);
|
||||
proxy->instantiate(dContext->priv().resourceProvider());
|
||||
|
||||
|
@ -163,7 +163,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) {
|
||||
{
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
|
||||
format, kDims, GrRenderable::kNo, 1, GrMipmapped::kNo, SkBackingFit::kExact,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
|
||||
{
|
||||
SkTArray<GrSurfaceProxyView> views;
|
||||
|
@ -254,7 +254,7 @@ bool GrDrawingManager::ProgramUnitTest(GrDirectContext* direct, int maxStages, i
|
||||
GrRenderable::kYes);
|
||||
auto proxy = proxyProvider->createProxy(format, kDims, GrRenderable::kYes, 1,
|
||||
mipmapped, SkBackingFit::kExact, SkBudgeted::kNo,
|
||||
GrProtected::kNo,/*label=*/{}, GrInternalSurfaceFlags::kNone);
|
||||
GrProtected::kNo, GrInternalSurfaceFlags::kNone);
|
||||
skgpu::Swizzle swizzle = caps->getReadSwizzle(format, GrColorType::kRGBA_8888);
|
||||
views[0] = {{std::move(proxy), kBottomLeft_GrSurfaceOrigin, swizzle},
|
||||
GrColorType::kRGBA_8888, kPremul_SkAlphaType};
|
||||
@ -265,7 +265,7 @@ bool GrDrawingManager::ProgramUnitTest(GrDirectContext* direct, int maxStages, i
|
||||
GrRenderable::kNo);
|
||||
auto proxy = proxyProvider->createProxy(format, kDims, GrRenderable::kNo, 1, mipmapped,
|
||||
SkBackingFit::kExact, SkBudgeted::kNo,
|
||||
GrProtected::kNo, /*label=*/{}, GrInternalSurfaceFlags::kNone);
|
||||
GrProtected::kNo, GrInternalSurfaceFlags::kNone);
|
||||
skgpu::Swizzle swizzle = caps->getReadSwizzle(format, GrColorType::kAlpha_8);
|
||||
views[1] = {{std::move(proxy), kTopLeft_GrSurfaceOrigin, swizzle},
|
||||
GrColorType::kAlpha_8, kPremul_SkAlphaType};
|
||||
|
@ -134,7 +134,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DefferredProxyConversionTest, reporter, ctxIn
|
||||
{
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
|
||||
format, kDims, GrRenderable::kYes, 1, GrMipmapped::kNo, SkBackingFit::kApprox,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
|
||||
// Both RenderTarget and Texture
|
||||
GrRenderTargetProxy* rtProxy = proxy->asRenderTargetProxy();
|
||||
@ -148,7 +148,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DefferredProxyConversionTest, reporter, ctxIn
|
||||
{
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
|
||||
format, kDims, GrRenderable::kYes, 1, GrMipmapped::kNo, SkBackingFit::kApprox,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
|
||||
// Both RenderTarget and Texture - but via GrTextureProxy
|
||||
GrTextureProxy* tProxy = proxy->asTextureProxy();
|
||||
@ -162,7 +162,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DefferredProxyConversionTest, reporter, ctxIn
|
||||
{
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
|
||||
format, kDims, GrRenderable::kNo, 1, GrMipmapped::kNo, SkBackingFit::kApprox,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
// Texture-only
|
||||
GrTextureProxy* tProxy = proxy->asTextureProxy();
|
||||
REPORTER_ASSERT(reporter, tProxy);
|
||||
|
@ -30,7 +30,7 @@ static sk_sp<GrTextureProxy> make_deferred(GrRecordingContext* rContext) {
|
||||
GrRenderable::kYes);
|
||||
return proxyProvider->createProxy(format, {kWidthHeight, kWidthHeight}, GrRenderable::kYes, 1,
|
||||
GrMipmapped::kNo, SkBackingFit::kApprox, SkBudgeted::kYes,
|
||||
GrProtected::kNo, /*label=*/{});
|
||||
GrProtected::kNo);
|
||||
}
|
||||
|
||||
static sk_sp<GrTextureProxy> make_wrapped(GrRecordingContext* rContext) {
|
||||
|
@ -155,7 +155,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) {
|
||||
|
||||
sk_sp<GrTextureProxy> proxy = proxyProvider->createProxy(
|
||||
format, dims, GrRenderable::kYes, numSamples, GrMipmapped::kNo,
|
||||
fit, budgeted, GrProtected::kNo, /*label=*/{});
|
||||
fit, budgeted, GrProtected::kNo);
|
||||
REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(proxy));
|
||||
if (proxy) {
|
||||
REPORTER_ASSERT(reporter, proxy->asRenderTargetProxy());
|
||||
@ -201,7 +201,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) {
|
||||
|
||||
sk_sp<GrTextureProxy> proxy(proxyProvider->createProxy(
|
||||
format, dims, GrRenderable::kNo, numSamples, GrMipmapped::kNo,
|
||||
fit, budgeted, GrProtected::kNo, /*label=*/{}));
|
||||
fit, budgeted, GrProtected::kNo));
|
||||
REPORTER_ASSERT(reporter, SkToBool(tex) == SkToBool(proxy));
|
||||
if (proxy) {
|
||||
// This forces the proxy to compute and cache its
|
||||
@ -357,7 +357,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ZeroSizedProxyTest, reporter, ctxInfo) {
|
||||
|
||||
sk_sp<GrTextureProxy> proxy = provider->createProxy(
|
||||
format, {width, height}, renderable, 1, GrMipmapped::kNo, fit,
|
||||
SkBudgeted::kNo, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kNo, GrProtected::kNo);
|
||||
REPORTER_ASSERT(reporter, !proxy);
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ static sk_sp<GrSurfaceProxy> make_deferred(GrProxyProvider* proxyProvider, const
|
||||
const ProxyParams& p) {
|
||||
const GrBackendFormat format = caps->getDefaultBackendFormat(p.fColorType, p.fRenderable);
|
||||
return proxyProvider->createProxy(format, {p.fSize, p.fSize}, p.fRenderable, p.fSampleCnt,
|
||||
GrMipmapped::kNo, p.fFit, p.fBudgeted, GrProtected::kNo, /*label=*/{});
|
||||
GrMipmapped::kNo, p.fFit, p.fBudgeted, GrProtected::kNo);
|
||||
}
|
||||
|
||||
static sk_sp<GrSurfaceProxy> make_backend(GrDirectContext* dContext, const ProxyParams& p) {
|
||||
|
@ -1705,7 +1705,7 @@ static sk_sp<GrTextureProxy> make_mipmap_proxy(GrRecordingContext* rContext,
|
||||
GrRenderable::kNo);
|
||||
|
||||
return proxyProvider->createProxy(format, dims, renderable, sampleCnt, GrMipmapped::kYes,
|
||||
SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo);
|
||||
}
|
||||
|
||||
// Exercise GrSurface::gpuMemorySize for different combos of MSAA, RT-only,
|
||||
|
@ -46,7 +46,7 @@ static sk_sp<GrSurfaceProxy> create_proxy(GrRecordingContext* rContext) {
|
||||
GrRenderable::kYes);
|
||||
return rContext->priv().proxyProvider()->createProxy(
|
||||
format, kDimensions, GrRenderable::kYes, 1, GrMipmapped::kNo, SkBackingFit::kExact,
|
||||
SkBudgeted::kNo, GrProtected::kNo, /*label=*/{}, GrInternalSurfaceFlags::kNone);
|
||||
SkBudgeted::kNo, GrProtected::kNo, GrInternalSurfaceFlags::kNone);
|
||||
}
|
||||
|
||||
static GrOp::Owner create_op(GrDirectContext* dContext, SkRect rect,
|
||||
|
@ -47,7 +47,7 @@ static sk_sp<GrTextureProxy> deferred_tex(skiatest::Reporter* reporter,
|
||||
|
||||
sk_sp<GrTextureProxy> proxy =
|
||||
proxyProvider->createProxy(format, kSize, GrRenderable::kNo, 1, GrMipmapped::kNo, fit,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
// Only budgeted & wrapped external proxies get to carry uniqueKeys
|
||||
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
|
||||
return proxy;
|
||||
@ -63,7 +63,7 @@ static sk_sp<GrTextureProxy> deferred_texRT(skiatest::Reporter* reporter,
|
||||
|
||||
sk_sp<GrTextureProxy> proxy =
|
||||
proxyProvider->createProxy(format, kSize, GrRenderable::kYes, 1, GrMipmapped::kNo, fit,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
// Only budgeted & wrapped external proxies get to carry uniqueKeys
|
||||
REPORTER_ASSERT(reporter, !proxy->getUniqueKey().isValid());
|
||||
return proxy;
|
||||
|
@ -535,7 +535,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixelsPendingIO, reporter, ctxInfo) {
|
||||
|
||||
sk_sp<GrTextureProxy> temp = proxyProvider->createProxy(
|
||||
format, kDims, GrRenderable::kNo, 1, GrMipmapped::kNo, SkBackingFit::kApprox,
|
||||
SkBudgeted::kYes, GrProtected::kNo, /*label=*/{});
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
temp->instantiate(context->priv().resourceProvider());
|
||||
}
|
||||
|
||||
|
@ -76,8 +76,7 @@ GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext* dContext,
|
||||
GrMipmapped::kNo,
|
||||
SkBackingFit::kExact,
|
||||
SkBudgeted::kYes,
|
||||
GrProtected::kNo,
|
||||
/*label=*/{});
|
||||
GrProtected::kNo);
|
||||
if (!proxy) {
|
||||
return {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user