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

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

Issue 2714413003: Remove GlyphBuffer (Closed)
Patch Set: format Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ShapeResultTestInfo_h 5 #ifndef ShapeResultTestInfo_h
6 #define ShapeResultTestInfo_h 6 #define ShapeResultTestInfo_h
7 7
8 #include "platform/fonts/shaping/HarfBuzzShaper.h" 8 #include "platform/fonts/shaping/HarfBuzzShaper.h"
9 #include "platform/fonts/shaping/ShapeResultBloberizer.h"
9 10
10 #include <hb.h> 11 #include <hb.h>
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class PLATFORM_EXPORT ShapeResultTestInfo : public ShapeResult { 15 class PLATFORM_EXPORT ShapeResultTestInfo : public ShapeResult {
15 public: 16 public:
16 unsigned numberOfRunsForTesting() const; 17 unsigned numberOfRunsForTesting() const;
17 bool runInfoForTesting(unsigned runIndex, 18 bool runInfoForTesting(unsigned runIndex,
18 unsigned& startIndex, 19 unsigned& startIndex,
19 unsigned& numGlyphs, 20 unsigned& numGlyphs,
20 hb_script_t&) const; 21 hb_script_t&) const;
21 uint16_t glyphForTesting(unsigned runIndex, size_t glyphIndex) const; 22 uint16_t glyphForTesting(unsigned runIndex, size_t glyphIndex) const;
22 float advanceForTesting(unsigned runIndex, size_t glyphIndex) const; 23 float advanceForTesting(unsigned runIndex, size_t glyphIndex) const;
23 SimpleFontData* fontDataForTesting(unsigned runIndex) const; 24 SimpleFontData* fontDataForTesting(unsigned runIndex) const;
24 }; 25 };
25 26
27 class PLATFORM_EXPORT ShapeResultBloberizerTestInfo {
28 public:
29 static const SimpleFontData* pendingRunFontData(
30 const ShapeResultBloberizer& bloberizer) {
31 return bloberizer.m_pendingFontData;
32 }
33
34 static const Vector<Glyph, 1024>& pendingRunGlyphs(
35 const ShapeResultBloberizer& bloberizer) {
36 return bloberizer.m_pendingGlyphs;
37 }
38
39 static const Vector<float, 1024>& pendingRunOffsets(
40 const ShapeResultBloberizer& bloberizer) {
41 return bloberizer.m_pendingOffsets;
42 }
43
44 static bool hasPendingRunVerticalOffsets(
45 const ShapeResultBloberizer& bloberizer) {
46 return bloberizer.hasPendingVerticalOffsets();
47 }
48
49 static size_t pendingBlobRunCount(const ShapeResultBloberizer& bloberizer) {
50 return bloberizer.m_builderRunCount;
51 }
52
53 static size_t committedBlobCount(const ShapeResultBloberizer& bloberizer) {
54 return bloberizer.m_blobs.size();
55 }
56 };
57
26 } // namespace blink 58 } // namespace blink
27 59
28 #endif // ShapeResultTestInfo_h 60 #endif // ShapeResultTestInfo_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698