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

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

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 1 month 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/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('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 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 "GrDistanceFieldTextContext.h" 8 #include "GrDistanceFieldTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrBitmapTextContext.h" 10 #include "GrBitmapTextContext.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 SkScalar paintGamma = deviceProperties.gamma(); 187 SkScalar paintGamma = deviceProperties.gamma();
188 SkScalar deviceGamma = deviceProperties.gamma(); 188 SkScalar deviceGamma = deviceProperties.gamma();
189 189
190 size = SkScalerContext::GetGammaLUTSize(contrast, paintGamma, deviceGamm a, 190 size = SkScalerContext::GetGammaLUTSize(contrast, paintGamma, deviceGamm a,
191 &width, &height); 191 &width, &height);
192 192
193 SkAutoTArray<uint8_t> data((int)size); 193 SkAutoTArray<uint8_t> data((int)size);
194 SkScalerContext::GetGammaLUTData(contrast, paintGamma, deviceGamma, data .get()); 194 SkScalerContext::GetGammaLUTData(contrast, paintGamma, deviceGamma, data .get());
195 195
196 // TODO: Update this to use the cache rather than directly creating a te xture. 196 // TODO: Update this to use the cache rather than directly creating a te xture.
197 GrTextureDesc desc; 197 GrSurfaceDesc desc;
198 desc.fFlags = kDynamicUpdate_GrTextureFlagBit; 198 desc.fFlags = kNone_GrSurfaceFlags;
199 desc.fWidth = width; 199 desc.fWidth = width;
200 desc.fHeight = height; 200 desc.fHeight = height;
201 desc.fConfig = kAlpha_8_GrPixelConfig; 201 desc.fConfig = kAlpha_8_GrPixelConfig;
202 202
203 *gammaTexture = context->getGpu()->createTexture(desc, NULL, 0); 203 *gammaTexture = context->getGpu()->createTexture(desc, NULL, 0);
204 if (NULL == *gammaTexture) { 204 if (NULL == *gammaTexture) {
205 return; 205 return;
206 } 206 }
207 207
208 (*gammaTexture)->writePixels(0, 0, width, height, 208 (*gammaTexture)->writePixels(0, 0, width, height,
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 } 697 }
698 } 698 }
699 699
700 inline void GrDistanceFieldTextContext::finish() { 700 inline void GrDistanceFieldTextContext::finish() {
701 this->flush(); 701 this->flush();
702 fTotalVertexCount = 0; 702 fTotalVertexCount = 0;
703 703
704 GrTextContext::finish(); 704 GrTextContext::finish();
705 } 705 }
706 706
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698