Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 4cfae3b

Browse files
bsalomonSkia Commit-Bot
authored andcommitted
Remove GrTexturePriv
This existed because GrTexture used to be public. Change-Id: I5e507084ae12058a20481b517b9130b41c793d29 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305521 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
1 parent 13e3fae commit 4cfae3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+145
-232
lines changed

gn/gpu.gni

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ skia_gpu_sources = [
238238
"$_src/gpu/GrTextureAdjuster.h",
239239
"$_src/gpu/GrTextureMaker.cpp",
240240
"$_src/gpu/GrTextureMaker.h",
241-
"$_src/gpu/GrTexturePriv.h",
242241
"$_src/gpu/GrTextureProducer.cpp",
243242
"$_src/gpu/GrTextureProducer.h",
244243
"$_src/gpu/GrTextureProxy.cpp",

src/gpu/GrBackendTextureImageGenerator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "src/gpu/GrResourceProviderPriv.h"
2020
#include "src/gpu/GrSemaphore.h"
2121
#include "src/gpu/GrTexture.h"
22-
#include "src/gpu/GrTexturePriv.h"
2322
#include "src/gpu/GrTextureProxyPriv.h"
2423
#include "src/gpu/SkGr.h"
2524
#include "src/gpu/gl/GrGLTexture.h"

src/gpu/GrDrawingManager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "src/gpu/GrSurfaceContext.h"
3131
#include "src/gpu/GrSurfaceProxyPriv.h"
3232
#include "src/gpu/GrTexture.h"
33-
#include "src/gpu/GrTexturePriv.h"
3433
#include "src/gpu/GrTextureProxy.h"
3534
#include "src/gpu/GrTextureProxyPriv.h"
3635
#include "src/gpu/GrTextureResolveRenderTask.h"

src/gpu/GrGpu.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include "src/gpu/GrStencilAttachment.h"
3232
#include "src/gpu/GrStencilSettings.h"
3333
#include "src/gpu/GrSurfacePriv.h"
34-
#include "src/gpu/GrTexturePriv.h"
3534
#include "src/gpu/GrTextureProxyPriv.h"
3635
#include "src/gpu/GrTracing.h"
3736
#include "src/utils/SkJSONWriter.h"
@@ -159,7 +158,7 @@ sk_sp<GrTexture> GrGpu::createTexture(SkISize dimensions,
159158
auto tex = this->createTextureCommon(dimensions, format, renderable, renderTargetSampleCnt,
160159
budgeted, isProtected, mipLevelCount, levelClearMask);
161160
if (tex && mipMapped == GrMipmapped::kYes && levelClearMask) {
162-
tex->texturePriv().markMipmapsClean();
161+
tex->markMipmapsClean();
163162
}
164163
return tex;
165164
}
@@ -215,7 +214,7 @@ sk_sp<GrTexture> GrGpu::createTexture(SkISize dimensions,
215214
markMipLevelsClean = true;
216215
}
217216
if (markMipLevelsClean) {
218-
tex->texturePriv().markMipmapsClean();
217+
tex->markMipmapsClean();
219218
}
220219
}
221220
return tex;
@@ -552,8 +551,8 @@ bool GrGpu::regenerateMipMapLevels(GrTexture* texture) {
552551
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
553552
SkASSERT(texture);
554553
SkASSERT(this->caps()->mipmapSupport());
555-
SkASSERT(texture->texturePriv().mipmapped() == GrMipmapped::kYes);
556-
if (!texture->texturePriv().mipmapsAreDirty()) {
554+
SkASSERT(texture->mipmapped() == GrMipmapped::kYes);
555+
if (!texture->mipmapsAreDirty()) {
557556
// This can happen when the proxy expects mipmaps to be dirty, but they are not dirty on the
558557
// actual target. This may be caused by things that the drawingManager could not predict,
559558
// i.e., ops that don't draw anything, aborting a draw for exceptional circumstances, etc.
@@ -564,7 +563,7 @@ bool GrGpu::regenerateMipMapLevels(GrTexture* texture) {
564563
return false;
565564
}
566565
if (this->onRegenerateMipMapLevels(texture)) {
567-
texture->texturePriv().markMipmapsClean();
566+
texture->markMipmapsClean();
568567
return true;
569568
}
570569
return false;
@@ -589,7 +588,7 @@ void GrGpu::didWriteToSurface(GrSurface* surface, GrSurfaceOrigin origin, const
589588
if (nullptr == bounds || !bounds->isEmpty()) {
590589
GrTexture* texture = surface->asTexture();
591590
if (texture && 1 == mipLevels) {
592-
texture->texturePriv().markMipmapsDirty();
591+
texture->markMipmapsDirty();
593592
}
594593
}
595594
}

src/gpu/GrOpsRenderPass.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "src/gpu/GrRenderTargetPriv.h"
1818
#include "src/gpu/GrScissorState.h"
1919
#include "src/gpu/GrSimpleMesh.h"
20-
#include "src/gpu/GrTexturePriv.h"
20+
#include "src/gpu/GrTexture.h"
2121

2222
void GrOpsRenderPass::begin() {
2323
fDrawPipelineStatus = DrawPipelineStatus::kNotConfigured;
@@ -162,8 +162,7 @@ void GrOpsRenderPass::bindTextures(const GrPrimitiveProcessor& primProc,
162162
(tex->width() != 1 || tex->height() != 1)) {
163163
// There are some cases where we might be given a non-mipmapped texture with a mipmap
164164
// filter. See skbug.com/7094.
165-
SkASSERT(tex->texturePriv().mipmapped() != GrMipmapped::kYes ||
166-
!tex->texturePriv().mipmapsAreDirty());
165+
SkASSERT(tex->mipmapped() != GrMipmapped::kYes || !tex->mipmapsAreDirty());
167166
}
168167
}
169168
#endif

src/gpu/GrOpsTask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "src/gpu/GrRenderTargetPriv.h"
2424
#include "src/gpu/GrResourceAllocator.h"
2525
#include "src/gpu/GrStencilAttachment.h"
26-
#include "src/gpu/GrTexturePriv.h"
26+
#include "src/gpu/GrTexture.h"
2727
#include "src/gpu/geometry/GrRect.h"
2828
#include "src/gpu/ops/GrClearOp.h"
2929

src/gpu/GrProgramDesc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "src/gpu/GrProgramInfo.h"
1616
#include "src/gpu/GrRenderTargetPriv.h"
1717
#include "src/gpu/GrShaderCaps.h"
18-
#include "src/gpu/GrTexturePriv.h"
18+
#include "src/gpu/GrTexture.h"
1919
#include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
2020
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
2121

src/gpu/GrProgramInfo.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GrStencilSettings GrProgramInfo::nonGLStencilSettings() const {
2222
}
2323

2424
#ifdef SK_DEBUG
25-
#include "src/gpu/GrTexturePriv.h"
25+
#include "src/gpu/GrTexture.h"
2626

2727
void GrProgramInfo::validate(bool flushTime) const {
2828
if (flushTime) {
@@ -47,8 +47,7 @@ void GrProgramInfo::checkMSAAAndMIPSAreResolved() const {
4747
(tex->width() != 1 || tex->height() != 1)) {
4848
// There are some cases where we might be given a non-mipmapped texture with a
4949
// mipmap filter. See skbug.com/7094.
50-
SkASSERT(tex->texturePriv().mipmapped() != GrMipmapped::kYes ||
51-
!tex->texturePriv().mipmapsAreDirty());
50+
SkASSERT(tex->mipmapped() != GrMipmapped::kYes || !tex->mipmapsAreDirty());
5251
}
5352
});
5453
}

src/gpu/GrResourceProvider.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "src/gpu/GrResourceCache.h"
2525
#include "src/gpu/GrSemaphore.h"
2626
#include "src/gpu/GrStencilAttachment.h"
27-
#include "src/gpu/GrTexturePriv.h"
27+
#include "src/gpu/GrTexture.h"
2828
#include "src/gpu/SkGr.h"
2929

3030
const int GrResourceProvider::kMinScratchTextureSize = 16;
@@ -263,8 +263,8 @@ sk_sp<GrTexture> GrResourceProvider::refScratchTexture(SkISize dimensions,
263263
// to fall back to making a new texture.
264264
if (fGpu->caps()->reuseScratchTextures() || renderable == GrRenderable::kYes) {
265265
GrScratchKey key;
266-
GrTexturePriv::ComputeScratchKey(*this->caps(), format, dimensions, renderable,
267-
renderTargetSampleCnt, mipMapped, isProtected, &key);
266+
GrTexture::ComputeScratchKey(*this->caps(), format, dimensions, renderable,
267+
renderTargetSampleCnt, mipMapped, isProtected, &key);
268268
GrGpuResource* resource = fCache->findAndRefScratchResource(key);
269269
if (resource) {
270270
fGpu->stats()->incNumScratchTexturesReused();

src/gpu/GrSurfaceProxy.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "src/gpu/GrRenderTargetContext.h"
2121
#include "src/gpu/GrStencilAttachment.h"
2222
#include "src/gpu/GrSurfacePriv.h"
23-
#include "src/gpu/GrTexturePriv.h"
23+
#include "src/gpu/GrTexture.h"
2424
#include "src/gpu/GrTextureRenderTargetProxy.h"
2525

2626
#ifdef SK_DEBUG
@@ -212,8 +212,8 @@ void GrSurfaceProxy::computeScratchKey(const GrCaps& caps, GrScratchKey* key) co
212212
mipMapped = tp->mipmapped();
213213
}
214214

215-
GrTexturePriv::ComputeScratchKey(caps, this->backendFormat(), this->backingStoreDimensions(),
216-
renderable, sampleCount, mipMapped, fIsProtected, key);
215+
GrTexture::ComputeScratchKey(caps, this->backendFormat(), this->backingStoreDimensions(),
216+
renderable, sampleCount, mipMapped, fIsProtected, key);
217217
}
218218

219219
SkISize GrSurfaceProxy::backingStoreDimensions() const {

0 commit comments

Comments
 (0)