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

Side by Side Diff: src/gpu/SkGrPixelRef.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 unified diff | Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 9
10 #include "SkGrPixelRef.h" 10 #include "SkGrPixelRef.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 srcRect = SkIRect::MakeWH(texture->width(), texture->height()); 68 srcRect = SkIRect::MakeWH(texture->width(), texture->height());
69 } else { 69 } else {
70 SkASSERT(SkIRect::MakeWH(texture->width(), texture->height()).contains(* subset)); 70 SkASSERT(SkIRect::MakeWH(texture->width(), texture->height()).contains(* subset));
71 // Create a new texture that is the size of subset. 71 // Create a new texture that is the size of subset.
72 desc.fWidth = subset->width(); 72 desc.fWidth = subset->width();
73 desc.fHeight = subset->height(); 73 desc.fHeight = subset->height();
74 srcRect = *subset; 74 srcRect = *subset;
75 } 75 }
76 desc.fFlags = kRenderTarget_GrSurfaceFlag; 76 desc.fFlags = kRenderTarget_GrSurfaceFlag;
77 desc.fConfig = SkImageInfo2GrPixelConfig(dstCT, kPremul_SkAlphaType, dstPT, *context->caps()); 77 desc.fConfig = SkImageInfo2GrPixelConfig(dstCT, kPremul_SkAlphaType, dstPT, *context->caps());
78 desc.fTextureStorageAllocator = texture->desc().fTextureStorageAllocator;
79 desc.fIsMipMapped = false; 78 desc.fIsMipMapped = false;
80 79
81 GrTexture* dst = context->textureProvider()->createTexture(desc, SkBudgeted: :kNo, nullptr, 0); 80 GrTexture* dst = context->textureProvider()->createTexture(desc, SkBudgeted: :kNo, nullptr, 0);
82 if (nullptr == dst) { 81 if (nullptr == dst) {
83 return nullptr; 82 return nullptr;
84 } 83 }
85 84
86 // Blink is relying on the above copy being sent to GL immediately in the ca se when the source 85 // Blink is relying on the above copy being sent to GL immediately in the ca se when the source
87 // is a WebGL canvas backing store. We could have a TODO to remove this flus h, but we have 86 // is a WebGL canvas backing store. We could have a TODO to remove this flus h, but we have
88 // a larger TODO to remove SkGrPixelRef entirely. 87 // a larger TODO to remove SkGrPixelRef entirely.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 cachedBitmap.setImmutable(); 204 cachedBitmap.setImmutable();
206 //Add to the cache 205 //Add to the cache
207 SkBitmapCache::Add(this, bounds, cachedBitmap); 206 SkBitmapCache::Add(this, bounds, cachedBitmap);
208 207
209 dst->swap(cachedBitmap); 208 dst->swap(cachedBitmap);
210 } 209 }
211 210
212 return true; 211 return true;
213 212
214 } 213 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698