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

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

Issue 2180503002: Add destination color space to AsFPArgs. Eliminates last XFORMTODO. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/text/GrStencilAndCoverTextContext.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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 GrBatchFontCache* cache = this->getBatchFontCache(); 133 GrBatchFontCache* cache = this->getBatchFontCache();
134 134
135 return cache->getTexture(format); 135 return cache->getTexture(format);
136 } 136 }
137 137
138 void SkGpuDevice::drawTexture(GrTexture* tex, const SkRect& dst, const SkPaint& paint) { 138 void SkGpuDevice::drawTexture(GrTexture* tex, const SkRect& dst, const SkPaint& paint) {
139 GrPaint grPaint; 139 GrPaint grPaint;
140 SkMatrix mat; 140 SkMatrix mat;
141 mat.reset(); 141 mat.reset();
142 if (!SkPaintToGrPaint(this->context(), paint, mat, 142 if (!SkPaintToGrPaint(this->context(), paint, mat,
143 this->surfaceProps().isGammaCorrect(), &grPaint)) { 143 this->surfaceProps().isGammaCorrect(), fDrawContext->g etColorSpace(),
144 &grPaint)) {
144 return; 145 return;
145 } 146 }
146 SkMatrix textureMat; 147 SkMatrix textureMat;
147 textureMat.reset(); 148 textureMat.reset();
148 textureMat[SkMatrix::kMScaleX] = 1.0f/dst.width(); 149 textureMat[SkMatrix::kMScaleX] = 1.0f/dst.width();
149 textureMat[SkMatrix::kMScaleY] = 1.0f/dst.height(); 150 textureMat[SkMatrix::kMScaleY] = 1.0f/dst.height();
150 textureMat[SkMatrix::kMTransX] = -dst.fLeft/dst.width(); 151 textureMat[SkMatrix::kMTransX] = -dst.fLeft/dst.width();
151 textureMat[SkMatrix::kMTransY] = -dst.fTop/dst.height(); 152 textureMat[SkMatrix::kMTransY] = -dst.fTop/dst.height();
152 153
153 grPaint.addColorTextureProcessor(tex, nullptr, textureMat); 154 grPaint.addColorTextureProcessor(tex, nullptr, textureMat);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 SkASSERT(nullptr == fGpu); 398 SkASSERT(nullptr == fGpu);
398 fGpu = new MockGpu(this, options); 399 fGpu = new MockGpu(this, options);
399 SkASSERT(fGpu); 400 SkASSERT(fGpu);
400 this->initCommon(options); 401 this->initCommon(options);
401 402
402 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 403 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
403 // these objects are required for any of tests that use this context. TODO: make stop allocating 404 // these objects are required for any of tests that use this context. TODO: make stop allocating
404 // resources in the buffer pools. 405 // resources in the buffer pools.
405 fDrawingManager->abandon(); 406 fDrawingManager->abandon();
406 } 407 }
OLDNEW
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698