| OLD | NEW |
| 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 #include "platform/fonts/shaping/ShapeResultBloberizer.h" |
| 10 | 10 |
| 11 #include <hb.h> | 11 #include <hb.h> |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class PLATFORM_EXPORT ShapeResultTestInfo : public ShapeResult { | 15 class PLATFORM_EXPORT ShapeResultTestInfo : public ShapeResult { |
| 16 public: | 16 public: |
| 17 unsigned NumberOfRunsForTesting() const; | 17 unsigned NumberOfRunsForTesting() const; |
| 18 bool RunInfoForTesting(unsigned run_index, | 18 bool RunInfoForTesting(unsigned run_index, |
| 19 unsigned& start_index, | 19 unsigned& start_index, |
| 20 unsigned& num_glyphs, | 20 unsigned& num_glyphs, |
| 21 hb_script_t&) const; | 21 hb_script_t&) const; |
| 22 bool RunInfoForTesting(unsigned run_index, |
| 23 unsigned& start_index, |
| 24 unsigned& num_characters, |
| 25 unsigned& num_glyphs, |
| 26 hb_script_t&) const; |
| 22 uint16_t GlyphForTesting(unsigned run_index, size_t glyph_index) const; | 27 uint16_t GlyphForTesting(unsigned run_index, size_t glyph_index) const; |
| 23 float AdvanceForTesting(unsigned run_index, size_t glyph_index) const; | 28 float AdvanceForTesting(unsigned run_index, size_t glyph_index) const; |
| 24 SimpleFontData* FontDataForTesting(unsigned run_index) const; | 29 SimpleFontData* FontDataForTesting(unsigned run_index) const; |
| 25 }; | 30 }; |
| 26 | 31 |
| 27 class PLATFORM_EXPORT ShapeResultBloberizerTestInfo { | 32 class PLATFORM_EXPORT ShapeResultBloberizerTestInfo { |
| 28 public: | 33 public: |
| 29 static const SimpleFontData* PendingRunFontData( | 34 static const SimpleFontData* PendingRunFontData( |
| 30 const ShapeResultBloberizer& bloberizer) { | 35 const ShapeResultBloberizer& bloberizer) { |
| 31 return bloberizer.pending_font_data_; | 36 return bloberizer.pending_font_data_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 51 } | 56 } |
| 52 | 57 |
| 53 static size_t CommittedBlobCount(const ShapeResultBloberizer& bloberizer) { | 58 static size_t CommittedBlobCount(const ShapeResultBloberizer& bloberizer) { |
| 54 return bloberizer.blobs_.size(); | 59 return bloberizer.blobs_.size(); |
| 55 } | 60 } |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 } // namespace blink | 63 } // namespace blink |
| 59 | 64 |
| 60 #endif // ShapeResultTestInfo_h | 65 #endif // ShapeResultTestInfo_h |
| OLD | NEW |