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

Unified Diff: src/gpu/GrTextureProvider.cpp

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/GrTextureParamsAdjuster.cpp ('k') | src/gpu/GrYUVProvider.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextureProvider.cpp
diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp
index 01c8a8e7a2bbe5a185bdc3ffee02bfd5496bc174..7d720eb1212dd0455953892c75e550155975fe03 100644
--- a/src/gpu/GrTextureProvider.cpp
+++ b/src/gpu/GrTextureProvider.cpp
@@ -29,7 +29,7 @@
{
}
-GrTexture* GrTextureProvider::createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
+GrTexture* GrTextureProvider::createTexture(const GrSurfaceDesc& desc, bool budgeted,
const void* srcData, size_t rowBytes) {
ASSERT_SINGLE_OWNER
if (this->isAbandoned()) {
@@ -46,7 +46,7 @@
if (GrTexture* texture = this->refScratchTexture(desc, kFlags)) {
if (!srcData || texture->writePixels(0, 0, desc.fWidth, desc.fHeight, desc.fConfig,
srcData, rowBytes)) {
- if (SkBudgeted::kNo == budgeted) {
+ if (!budgeted) {
texture->resourcePriv().makeUnbudgeted();
}
return texture;
@@ -117,7 +117,7 @@
}
if (!(kNoCreate_ScratchTextureFlag & flags)) {
- return fGpu->createTexture(*desc, SkBudgeted::kYes, nullptr, 0);
+ return fGpu->createTexture(*desc, true, nullptr, 0);
}
return nullptr;
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.cpp ('k') | src/gpu/GrYUVProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698