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

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

Issue 846303002: Make uncached textures uncached from the get go. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment Created 5 years, 11 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/GrContext.cpp ('k') | src/gpu/GrGeometryBuffer.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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 SkAutoTArray<uint8_t> data((int)size); 181 SkAutoTArray<uint8_t> data((int)size);
182 SkScalerContext::GetGammaLUTData(contrast, paintGamma, deviceGamma, data .get()); 182 SkScalerContext::GetGammaLUTData(contrast, paintGamma, deviceGamma, data .get());
183 183
184 // TODO: Update this to use the cache rather than directly creating a te xture. 184 // TODO: Update this to use the cache rather than directly creating a te xture.
185 GrSurfaceDesc desc; 185 GrSurfaceDesc desc;
186 desc.fFlags = kNone_GrSurfaceFlags; 186 desc.fFlags = kNone_GrSurfaceFlags;
187 desc.fWidth = width; 187 desc.fWidth = width;
188 desc.fHeight = height; 188 desc.fHeight = height;
189 desc.fConfig = kAlpha_8_GrPixelConfig; 189 desc.fConfig = kAlpha_8_GrPixelConfig;
190 190
191 *gammaTexture = context->getGpu()->createTexture(desc, NULL, 0); 191 *gammaTexture = context->getGpu()->createTexture(desc, true, NULL, 0);
192 if (NULL == *gammaTexture) { 192 if (NULL == *gammaTexture) {
193 return; 193 return;
194 } 194 }
195 195
196 (*gammaTexture)->writePixels(0, 0, width, height, 196 (*gammaTexture)->writePixels(0, 0, width, height,
197 (*gammaTexture)->config(), data.get(), 0, 197 (*gammaTexture)->config(), data.get(), 0,
198 GrContext::kDontFlush_PixelOpsFlag); 198 GrContext::kDontFlush_PixelOpsFlag);
199 } 199 }
200 } 200 }
201 201
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 } 683 }
684 } 684 }
685 685
686 inline void GrDistanceFieldTextContext::finish() { 686 inline void GrDistanceFieldTextContext::finish() {
687 this->flush(); 687 this->flush();
688 fTotalVertexCount = 0; 688 fTotalVertexCount = 0;
689 689
690 GrTextContext::finish(); 690 GrTextContext::finish();
691 } 691 }
692 692
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrGeometryBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698