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

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

Issue 1106663003: simple fix for preabandon valgrind error (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 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 #include "GrAtlasTextContext.h" 7 #include "GrAtlasTextContext.h"
8 8
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 bool noGamma) { 353 bool noGamma) {
354 skPaint.getScalerContextDescriptor(&run->fDescriptor, &fDeviceProperties, vi ewMatrix, noGamma); 354 skPaint.getScalerContextDescriptor(&run->fDescriptor, &fDeviceProperties, vi ewMatrix, noGamma);
355 run->fTypeface.reset(SkSafeRef(skPaint.getTypeface())); 355 run->fTypeface.reset(SkSafeRef(skPaint.getTypeface()));
356 return SkGlyphCache::DetachCache(run->fTypeface, run->fDescriptor.getDesc()) ; 356 return SkGlyphCache::DetachCache(run->fTypeface, run->fDescriptor.getDesc()) ;
357 } 357 }
358 358
359 void GrAtlasTextContext::drawTextBlob(GrRenderTarget* rt, const GrClip& clip, 359 void GrAtlasTextContext::drawTextBlob(GrRenderTarget* rt, const GrClip& clip,
360 const SkPaint& skPaint, const SkMatrix& vi ewMatrix, 360 const SkPaint& skPaint, const SkMatrix& vi ewMatrix,
361 const SkTextBlob* blob, SkScalar x, SkScal ar y, 361 const SkTextBlob* blob, SkScalar x, SkScal ar y,
362 SkDrawFilter* drawFilter, const SkIRect& c lipBounds) { 362 SkDrawFilter* drawFilter, const SkIRect& c lipBounds) {
363 // If we have been abandoned, then don't draw
364 if (!fContext->getTextTarget()) {
365 return;
366 }
367
363 SkAutoTUnref<BitmapTextBlob> cacheBlob; 368 SkAutoTUnref<BitmapTextBlob> cacheBlob;
364 SkMaskFilter::BlurRec blurRec; 369 SkMaskFilter::BlurRec blurRec;
365 BitmapTextBlob::Key key; 370 BitmapTextBlob::Key key;
366 // It might be worth caching these things, but its not clear at this time 371 // It might be worth caching these things, but its not clear at this time
367 // TODO for animated mask filters, this will fill up our cache. We need a s afeguard here 372 // TODO for animated mask filters, this will fill up our cache. We need a s afeguard here
368 const SkMaskFilter* mf = skPaint.getMaskFilter(); 373 const SkMaskFilter* mf = skPaint.getMaskFilter();
369 bool canCache = !(skPaint.getPathEffect() || 374 bool canCache = !(skPaint.getPathEffect() ||
370 (mf && !mf->asABlur(&blurRec)) || 375 (mf && !mf->asABlur(&blurRec)) ||
371 drawFilter); 376 drawFilter);
372 377
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 pipelineBuilder.setFromPaint(grPaint, rt, clip); 2169 pipelineBuilder.setFromPaint(grPaint, rt, clip);
2165 2170
2166 GrColor color = grPaint.getColor(); 2171 GrColor color = grPaint.getColor();
2167 for (int run = 0; run < cacheBlob->fRunCount; run++) { 2172 for (int run = 0; run < cacheBlob->fRunCount; run++) {
2168 this->flushRun(target, &pipelineBuilder, cacheBlob, run, color, 0, 0, sk Paint); 2173 this->flushRun(target, &pipelineBuilder, cacheBlob, run, color, 0, 0, sk Paint);
2169 } 2174 }
2170 2175
2171 // Now flush big glyphs 2176 // Now flush big glyphs
2172 this->flushBigGlyphs(cacheBlob, rt, grPaint, clip, 0, 0); 2177 this->flushBigGlyphs(cacheBlob, rt, grPaint, clip, 0, 0);
2173 } 2178 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698