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

Side by Side Diff: src/gpu/text/GrStencilAndCoverTextContext.cpp

Issue 1782973002: Revert of Use std::unique_ptr. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/GrLayerAtlas.cpp ('k') | src/pdf/SkPDFDevice.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 2014 Google Inc. 2 * Copyright 2014 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 "GrStencilAndCoverTextContext.h" 8 #include "GrStencilAndCoverTextContext.h"
9 #include "GrAtlasTextContext.h" 9 #include "GrAtlasTextContext.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 fCpuMemorySize += run->computeSizeInCache(); 322 fCpuMemorySize += run->computeSizeInCache();
323 } 323 }
324 } 324 }
325 325
326 //////////////////////////////////////////////////////////////////////////////// //////////////////// 326 //////////////////////////////////////////////////////////////////////////////// ////////////////////
327 327
328 class GrStencilAndCoverTextContext::FallbackBlobBuilder { 328 class GrStencilAndCoverTextContext::FallbackBlobBuilder {
329 public: 329 public:
330 FallbackBlobBuilder() : fBuffIdx(0), fCount(0) {} 330 FallbackBlobBuilder() : fBuffIdx(0), fCount(0) {}
331 331
332 bool isInitialized() const { return fBuilder != nullptr; } 332 bool isInitialized() const { return SkToBool(fBuilder); }
333 333
334 void init(const SkPaint& font, SkScalar textRatio); 334 void init(const SkPaint& font, SkScalar textRatio);
335 335
336 void appendGlyph(uint16_t glyphId, const SkPoint& pos); 336 void appendGlyph(uint16_t glyphId, const SkPoint& pos);
337 337
338 const SkTextBlob* buildIfNeeded(int* count); 338 const SkTextBlob* buildIfNeeded(int* count);
339 339
340 private: 340 private:
341 enum { kWriteBufferSize = 1024 }; 341 enum { kWriteBufferSize = 1024 };
342 342
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } 704 }
705 705
706 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed ed(int *count) { 706 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed ed(int *count) {
707 *count = fCount; 707 *count = fCount;
708 if (fCount) { 708 if (fCount) {
709 this->flush(); 709 this->flush();
710 return fBuilder->build(); 710 return fBuilder->build();
711 } 711 }
712 return nullptr; 712 return nullptr;
713 } 713 }
OLDNEW
« no previous file with comments | « src/gpu/GrLayerAtlas.cpp ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698