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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "platform/fonts/FontDescription.h" 34 #include "platform/fonts/FontDescription.h"
35 #include "platform/fonts/SmallCapsIterator.h" 35 #include "platform/fonts/SmallCapsIterator.h"
36 #include "platform/fonts/shaping/ShapeResult.h" 36 #include "platform/fonts/shaping/ShapeResult.h"
37 #include "platform/fonts/shaping/Shaper.h" 37 #include "platform/fonts/shaping/Shaper.h"
38 #include "platform/geometry/FloatPoint.h" 38 #include "platform/geometry/FloatPoint.h"
39 #include "platform/geometry/FloatRect.h" 39 #include "platform/geometry/FloatRect.h"
40 #include "platform/text/TextRun.h" 40 #include "platform/text/TextRun.h"
41 #include "wtf/Allocator.h" 41 #include "wtf/Allocator.h"
42 #include "wtf/Deque.h" 42 #include "wtf/Deque.h"
43 #include "wtf/HashSet.h" 43 #include "wtf/HashSet.h"
44 #include "wtf/OwnPtr.h"
45 #include "wtf/PassOwnPtr.h"
44 #include "wtf/Vector.h" 46 #include "wtf/Vector.h"
45 #include "wtf/text/CharacterNames.h" 47 #include "wtf/text/CharacterNames.h"
48
46 #include <hb.h> 49 #include <hb.h>
47 #include <memory>
48 #include <unicode/uscript.h> 50 #include <unicode/uscript.h>
49 51
50 namespace blink { 52 namespace blink {
51 53
52 class Font; 54 class Font;
53 class GlyphBuffer; 55 class GlyphBuffer;
54 class SimpleFontData; 56 class SimpleFontData;
55 class HarfBuzzShaper; 57 class HarfBuzzShaper;
56 class UnicodeRangeSet; 58 class UnicodeRangeSet;
57 59
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 hb_language_t); 197 hb_language_t);
196 bool extractShapeResults(hb_buffer_t* harfBuzzBuffer, 198 bool extractShapeResults(hb_buffer_t* harfBuzzBuffer,
197 ShapeResult*, 199 ShapeResult*,
198 bool& fontCycleQueued, 200 bool& fontCycleQueued,
199 const HolesQueueItem& currentQueueItem, 201 const HolesQueueItem& currentQueueItem,
200 const SimpleFontData* currentFont, 202 const SimpleFontData* currentFont,
201 UScriptCode currentRunScript, 203 UScriptCode currentRunScript,
202 bool isLastResort); 204 bool isLastResort);
203 bool collectFallbackHintChars(Vector<UChar32>& hint, bool needsList); 205 bool collectFallbackHintChars(Vector<UChar32>& hint, bool needsList);
204 206
205 void insertRunIntoShapeResult(ShapeResult*, std::unique_ptr<ShapeResult::Run Info> runToInsert, unsigned startGlyph, unsigned numGlyphs, hb_buffer_t*); 207 void insertRunIntoShapeResult(ShapeResult*, PassOwnPtr<ShapeResult::RunInfo> runToInsert, unsigned startGlyph, unsigned numGlyphs, hb_buffer_t*);
206 208
207 std::unique_ptr<UChar[]> m_normalizedBuffer; 209 OwnPtr<UChar[]> m_normalizedBuffer;
208 unsigned m_normalizedBufferLength; 210 unsigned m_normalizedBufferLength;
209 211
210 FeaturesVector m_features; 212 FeaturesVector m_features;
211 Deque<HolesQueueItem> m_holesQueue; 213 Deque<HolesQueueItem> m_holesQueue;
212 }; 214 };
213 215
214 216
215 } // namespace blink 217 } // namespace blink
216 218
217 #endif // HarfBuzzShaper_h 219 #endif // HarfBuzzShaper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698