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

Side by Side Diff: src/gpu/GrTextureParamsAdjuster.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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/GrTextureProvider.cpp » ('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 2015 Google Inc. 2 * Copyright 2015 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 #include "GrTextureParamsAdjuster.h" 8 #include "GrTextureParamsAdjuster.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (caps->isConfigRenderable(kSkia8888_GrPixelConfig, false)) { 56 if (caps->isConfigRenderable(kSkia8888_GrPixelConfig, false)) {
57 rtDesc.fConfig = kSkia8888_GrPixelConfig; 57 rtDesc.fConfig = kSkia8888_GrPixelConfig;
58 } else { 58 } else {
59 return nullptr; 59 return nullptr;
60 } 60 }
61 } else { 61 } else {
62 return nullptr; 62 return nullptr;
63 } 63 }
64 } 64 }
65 65
66 SkAutoTUnref<GrTexture> copy(context->textureProvider()->createTexture(rtDes c, 66 SkAutoTUnref<GrTexture> copy(context->textureProvider()->createTexture(rtDes c, true));
67 SkBud geted::kYes));
68 if (!copy) { 67 if (!copy) {
69 return nullptr; 68 return nullptr;
70 } 69 }
71 70
72 // TODO: If no scaling is being performed then use copySurface. 71 // TODO: If no scaling is being performed then use copySurface.
73 72
74 GrPaint paint; 73 GrPaint paint;
75 74
76 // TODO: Initializing these values for no reason cause the compiler is compl aining 75 // TODO: Initializing these values for no reason cause the compiler is compl aining
77 SkScalar sx = 0.f; 76 SkScalar sx = 0.f;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 filterOrNullForBicubic); 498 filterOrNullForBicubic);
500 } 499 }
501 500
502 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams ) { 501 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams ) {
503 SkAutoTUnref<GrTexture> original(this->refOriginalTexture()); 502 SkAutoTUnref<GrTexture> original(this->refOriginalTexture());
504 if (!original) { 503 if (!original) {
505 return nullptr; 504 return nullptr;
506 } 505 }
507 return copy_on_gpu(original, nullptr, copyParams); 506 return copy_on_gpu(original, nullptr, copyParams);
508 } 507 }
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/GrTextureProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698