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

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

Issue 2164363002: Add SkColorSpace to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ':' from comment Created 4 years, 5 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/GrRenderTarget.cpp ('k') | src/gpu/GrTextureToYUVPlanes.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 config = kSkia8888_GrPixelConfig; 54 config = kSkia8888_GrPixelConfig;
55 } else { 55 } else {
56 return nullptr; 56 return nullptr;
57 } 57 }
58 } else { 58 } else {
59 return nullptr; 59 return nullptr;
60 } 60 }
61 } 61 }
62 62
63 sk_sp<GrDrawContext> copyDC = context->newDrawContext(SkBackingFit::kExact, copyParams.fWidth, 63 sk_sp<GrDrawContext> copyDC = context->newDrawContext(SkBackingFit::kExact, copyParams.fWidth,
64 copyParams.fHeight, co nfig); 64 copyParams.fHeight, co nfig, nullptr);
65 if (!copyDC) { 65 if (!copyDC) {
66 return nullptr; 66 return nullptr;
67 } 67 }
68 68
69 GrPaint paint; 69 GrPaint paint;
70 paint.setGammaCorrect(true); 70 paint.setGammaCorrect(true);
71 71
72 SkScalar sx SK_INIT_TO_AVOID_WARNING; 72 SkScalar sx SK_INIT_TO_AVOID_WARNING;
73 SkScalar sy SK_INIT_TO_AVOID_WARNING; 73 SkScalar sy SK_INIT_TO_AVOID_WARNING;
74 if (subset) { 74 if (subset) {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } 516 }
517 517
518 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams , bool willBeMipped, 518 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams , bool willBeMipped,
519 SkSourceGammaTreatment gamma Treatment) { 519 SkSourceGammaTreatment gamma Treatment) {
520 SkAutoTUnref<GrTexture> original(this->refOriginalTexture(willBeMipped, gamm aTreatment)); 520 SkAutoTUnref<GrTexture> original(this->refOriginalTexture(willBeMipped, gamm aTreatment));
521 if (!original) { 521 if (!original) {
522 return nullptr; 522 return nullptr;
523 } 523 }
524 return copy_on_gpu(original, nullptr, copyParams); 524 return copy_on_gpu(original, nullptr, copyParams);
525 } 525 }
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTarget.cpp ('k') | src/gpu/GrTextureToYUVPlanes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698