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

Unified Diff: src/gpu/GrGpu.cpp

Issue 1862043002: Refactor to separate backend object lifecycle and GpuResource budget decision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unrelated GrBuffer::onGpuMemorySize() lack of override keyword compile error 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/GrGpu.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index d062a48129df89d09a5b4b4c016d58c0e64fd52a..eef7118a1b290aea3eccc3131fa3f4c67f14254d 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -150,9 +150,6 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, SkBudgeted budget
desc.fOrigin = resolve_origin(desc.fOrigin, isRT);
GrTexture* tex = nullptr;
- GrGpuResource::LifeCycle lifeCycle = SkBudgeted::kYes == budgeted ?
- GrGpuResource::kCached_LifeCycle :
- GrGpuResource::kUncached_LifeCycle;
if (GrPixelConfigIsCompressed(desc.fConfig)) {
// We shouldn't be rendering into this
@@ -165,10 +162,10 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, SkBudgeted budget
}
this->handleDirtyContext();
- tex = this->onCreateCompressedTexture(desc, lifeCycle, texels);
+ tex = this->onCreateCompressedTexture(desc, budgeted, texels);
} else {
this->handleDirtyContext();
- tex = this->onCreateTexture(desc, lifeCycle, texels);
+ tex = this->onCreateTexture(desc, budgeted, texels);
}
if (tex) {
if (!caps->reuseScratchTextures() && !isRT) {
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698