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

Side by Side Diff: src/gpu/GrTextureParamsAdjuster.cpp

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome 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, true)); 66 SkAutoTUnref<GrTexture> copy(context->textureProvider()->createTexture(rtDes c,
67 SkBud geted::kYes));
67 if (!copy) { 68 if (!copy) {
68 return nullptr; 69 return nullptr;
69 } 70 }
70 71
71 // TODO: If no scaling is being performed then use copySurface. 72 // TODO: If no scaling is being performed then use copySurface.
72 73
73 GrPaint paint; 74 GrPaint paint;
74 75
75 // TODO: Initializing these values for no reason cause the compiler is compl aining 76 // TODO: Initializing these values for no reason cause the compiler is compl aining
76 SkScalar sx = 0.f; 77 SkScalar sx = 0.f;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 filterOrNullForBicubic); 499 filterOrNullForBicubic);
499 } 500 }
500 501
501 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams ) { 502 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams ) {
502 SkAutoTUnref<GrTexture> original(this->refOriginalTexture()); 503 SkAutoTUnref<GrTexture> original(this->refOriginalTexture());
503 if (!original) { 504 if (!original) {
504 return nullptr; 505 return nullptr;
505 } 506 }
506 return copy_on_gpu(original, nullptr, copyParams); 507 return copy_on_gpu(original, nullptr, copyParams);
507 } 508 }
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