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

Side by Side Diff: tools/gpu/GrTest.cpp

Issue 1884873006: Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« include/gpu/GrPaint.h ('K') | « src/views/SkWindow.cpp ('k') | no next file » | 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 2013 Google Inc. 2 * Copyright 2013 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 "GrTest.h" 8 #include "GrTest.h"
9 9
10 #include "GrBatchAtlas.h" 10 #include "GrBatchAtlas.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 GrBatchFontCache* cache = this->getBatchFontCache(); 149 GrBatchFontCache* cache = this->getBatchFontCache();
150 150
151 return cache->getTexture(format); 151 return cache->getTexture(format);
152 } 152 }
153 153
154 void SkGpuDevice::drawTexture(GrTexture* tex, const SkRect& dst, const SkPaint& paint) { 154 void SkGpuDevice::drawTexture(GrTexture* tex, const SkRect& dst, const SkPaint& paint) {
155 GrPaint grPaint; 155 GrPaint grPaint;
156 SkMatrix mat; 156 SkMatrix mat;
157 mat.reset(); 157 mat.reset();
158 if (!SkPaintToGrPaint(this->context(), paint, mat, 158 if (!SkPaintToGrPaint(this->context(), paint, mat,
159 this->surfaceProps().allowSRGBInputs(), &grPaint)) { 159 this->surfaceProps().isGammaCorrect(), &grPaint)) {
160 return; 160 return;
161 } 161 }
162 SkMatrix textureMat; 162 SkMatrix textureMat;
163 textureMat.reset(); 163 textureMat.reset();
164 textureMat[SkMatrix::kMScaleX] = 1.0f/dst.width(); 164 textureMat[SkMatrix::kMScaleX] = 1.0f/dst.width();
165 textureMat[SkMatrix::kMScaleY] = 1.0f/dst.height(); 165 textureMat[SkMatrix::kMScaleY] = 1.0f/dst.height();
166 textureMat[SkMatrix::kMTransX] = -dst.fLeft/dst.width(); 166 textureMat[SkMatrix::kMTransX] = -dst.fLeft/dst.width();
167 textureMat[SkMatrix::kMTransY] = -dst.fTop/dst.height(); 167 textureMat[SkMatrix::kMTransY] = -dst.fTop/dst.height();
168 168
169 grPaint.addColorTextureProcessor(tex, textureMat); 169 grPaint.addColorTextureProcessor(tex, textureMat);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 SkASSERT(nullptr == fGpu); 410 SkASSERT(nullptr == fGpu);
411 fGpu = new MockGpu(this, options); 411 fGpu = new MockGpu(this, options);
412 SkASSERT(fGpu); 412 SkASSERT(fGpu);
413 this->initCommon(options); 413 this->initCommon(options);
414 414
415 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 415 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
416 // these objects are required for any of tests that use this context. TODO: make stop allocating 416 // these objects are required for any of tests that use this context. TODO: make stop allocating
417 // resources in the buffer pools. 417 // resources in the buffer pools.
418 fDrawingManager->abandon(); 418 fDrawingManager->abandon();
419 } 419 }
OLDNEW
« include/gpu/GrPaint.h ('K') | « src/views/SkWindow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698