Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1886613003: Remove GrTextureStorageAllocator. This was added from Chromium but never used and not expected to b… (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLTexture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index af5955014ae4935291c942047584cdb6fe3592dc..4f09ebae00b4556edf52cdb85b6a34d9035277fc 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1342,8 +1342,7 @@ bool GrGLGpu::uploadTexData(const GrSurfaceDesc& desc,
bool succeeded = true;
if (kNewTexture_UploadType == uploadType &&
0 == left && 0 == top &&
- desc.fWidth == width && desc.fHeight == height &&
- !desc.fTextureStorageAllocator.fAllocateTextureStorage) {
+ desc.fWidth == width && desc.fHeight == height) {
succeeded = allocate_and_populate_uncompressed_texture(desc, *interface, caps, target,
internalFormat, externalFormat,
externalType, texelsShallowCopy,
@@ -1863,10 +1862,6 @@ int GrGLGpu::getCompatibleStencilIndex(GrPixelConfig config) {
bool GrGLGpu::createTextureImpl(const GrSurfaceDesc& desc, GrGLTextureInfo* info,
bool renderTarget, GrGLTexture::TexParams* initialTexParams,
const SkTArray<GrMipLevel>& texels) {
- if (desc.fTextureStorageAllocator.fAllocateTextureStorage) {
- return this->createTextureExternalAllocatorImpl(desc, info, texels);
- }
-
info->fID = 0;
info->fTarget = GR_GL_TEXTURE_2D;
GL_CALL(GenTextures(1, &(info->fID)));
@@ -1897,39 +1892,6 @@ bool GrGLGpu::createTextureImpl(const GrSurfaceDesc& desc, GrGLTextureInfo* info
return true;
}
-bool GrGLGpu::createTextureExternalAllocatorImpl(const GrSurfaceDesc& desc,
- GrGLTextureInfo* info,
- const SkTArray<GrMipLevel>& texels) {
- // We do not make SkTArray available outside of Skia,
- // and so we do not want to allow mipmaps to external
- // allocators just yet.
- SkASSERT(texels.count() < 2);
-
- const void* pixels = nullptr;
- if (!texels.empty()) {
- pixels = texels.begin()->fPixels;
- }
- switch (desc.fTextureStorageAllocator.fAllocateTextureStorage(
- desc.fTextureStorageAllocator.fCtx, reinterpret_cast<GrBackendObject>(info),
- desc.fWidth, desc.fHeight, desc.fConfig, pixels, desc.fOrigin)) {
- case GrTextureStorageAllocator::Result::kSucceededAndUploaded:
- return true;
- case GrTextureStorageAllocator::Result::kFailed:
- return false;
- case GrTextureStorageAllocator::Result::kSucceededWithoutUpload:
- break;
- }
-
- if (!this->uploadTexData(desc, info->fTarget, kNewTexture_UploadType, 0, 0,
- desc.fWidth, desc.fHeight,
- desc.fConfig, texels)) {
- desc.fTextureStorageAllocator.fDeallocateTextureStorage(
- desc.fTextureStorageAllocator.fCtx, reinterpret_cast<GrBackendObject>(info));
- return false;
- }
- return true;
-}
-
GrStencilAttachment* GrGLGpu::createStencilAttachmentForRenderTarget(const GrRenderTarget* rt,
int width,
int height) {
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698