[LayoutNG] Implement ShapeResult::CopyRanges

Add new CopyRanges method to ShapeResult for batch processing sequential
ranges without the need to iterate over runs to determine start boundary
for each range.

This replaces the OpaqueContext parameter in CopyRange which implemented
a similar optimization, with a worse API, and limited to certain left to
right runs. Updates the LayoutNG shaping logic to use the new API during
item construction and paragraph level shaping for both LTR and RTL text.

Test: renderer/platform/fonts/shaping/shape_result_test.cc
Bug: 923962
Change-Id: I34912fb8821106da733c605585c33de01d28f3d7
Reviewed-on: https://chromium-review.googlesource.com/c/1474837
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Emil A Eklund <eae@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#632975}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c1cfec4f6014e085ca04b39befdbf67a1c80b6d3
13 files changed
tree: d721019397071cfd4241b06c23470a233bef7877
  1. abseil-cpp/
  2. accessibility-audit/
  3. accessibility_test_framework/
  4. adobe/
  5. afl/
  6. android_build_tools/
  7. android_crazy_linker/
  8. android_data_chart/
  9. android_deps/
  10. android_media/
  11. android_opengl/
  12. android_platform/
  13. android_protobuf/
  14. android_sdk/
  15. android_support_test_runner/
  16. android_swipe_refresh/
  17. android_system_sdk/
  18. androidx/
  19. apache-portable-runtime/
  20. apache-win32/
  21. apk-patch-size-estimator/
  22. apple_apsl/
  23. arcore-android-sdk/
  24. ashmem/
  25. auto/
  26. axe-core/
  27. bazel/
  28. binutils/
  29. blanketjs/
  30. blink/
  31. boringssl/
  32. bouncycastle/
  33. breakpad/
  34. brotli/
  35. bspatch/
  36. byte_buddy/
  37. cacheinvalidation/
  38. cct_dynamic_module/
  39. ced/
  40. chaijs/
  41. checkstyle/
  42. chromevox/
  43. cld_3/
  44. closure_compiler/
  45. colorama/
  46. crashpad/
  47. crc32c/
  48. custom_tabs_client/
  49. d3/
  50. dav1d/
  51. decklink/
  52. devscripts/
  53. dom_distiller_js/
  54. emoji-segmenter/
  55. errorprone/
  56. espresso/
  57. expat/
  58. feed/
  59. fips181/
  60. flatbuffers/
  61. flot/
  62. fontconfig/
  63. freetype/
  64. fuchsia-sdk/
  65. gestures/
  66. gif_player/
  67. glfw/
  68. glslang/
  69. google-truth/
  70. google_android_play_core/
  71. google_appengine_cloudstorage/
  72. google_input_tools/
  73. google_toolbox_for_mac/
  74. googletest/
  75. gradle_wrapper/
  76. gson/
  77. guava/
  78. gvr-android-keyboard/
  79. gvr-android-sdk/
  80. hamcrest/
  81. harfbuzz-ng/
  82. hunspell/
  83. iaccessible2/
  84. iccjpeg/
  85. icu4j/
  86. ijar/
  87. ink/
  88. inspector_protocol/
  89. instrumented_libraries/
  90. intellij/
  91. isimpledom/
  92. jinja2/
  93. jmake/
  94. jsoncpp/
  95. jsr-305/
  96. jstemplate/
  97. junit/
  98. khronos/
  99. lcov/
  100. leveldatabase/
  101. libaddressinput/
  102. libaom/
  103. libcxx-pretty-printers/
  104. libdrm/
  105. libevdev/
  106. libFuzzer/
  107. libjingle_xmpp/
  108. libjpeg/
  109. liblouis/
  110. libovr/
  111. libphonenumber/
  112. libpng/
  113. libprotobuf-mutator/
  114. libsecret/
  115. libsync/
  116. libudev/
  117. libusb/
  118. libvpx/
  119. libwebm/
  120. libwebp/
  121. libxml/
  122. libXNVCtrl/
  123. libxslt/
  124. logilab/
  125. lzma_sdk/
  126. mach_override/
  127. markdown/
  128. markupsafe/
  129. material_design_icons/
  130. mesa_headers/
  131. metrics_proto/
  132. microsoft_webauthn/
  133. minigbm/
  134. minizip/
  135. mocha/
  136. mockito/
  137. modp_b64/
  138. motemplate/
  139. mozilla/
  140. netty-tcnative/
  141. netty4/
  142. node/
  143. nvml/
  144. objenesis/
  145. ocmock/
  146. openh264/
  147. openvr/
  148. opus/
  149. ots/
  150. ow2_asm/
  151. pexpect/
  152. pffft/
  153. ply/
  154. polymer/
  155. proguard/
  156. protobuf/
  157. protoc_javalite/
  158. pycoverage/
  159. pyftpdlib/
  160. pyjson5/
  161. pylint/
  162. pymock/
  163. pystache/
  164. Python-Markdown/
  165. pywebsocket/
  166. qcms/
  167. quic_trace/
  168. qunit/
  169. r8/
  170. re2/
  171. requests/
  172. rnnoise/
  173. robolectric/
  174. s2cellid/
  175. sfntly/
  176. shaderc/
  177. simplejson/
  178. sinonjs/
  179. smhasher/
  180. snappy/
  181. speech-dispatcher/
  182. spirv-cross/
  183. spirv-headers/
  184. SPIRV-Tools/
  185. sqlite/
  186. sqlite4java/
  187. sudden_motion_sensor/
  188. tcmalloc/
  189. test_fonts/
  190. tlslite/
  191. ub-uiautomator/
  192. unrar/
  193. usb_ids/
  194. usrsctp/
  195. v4l-utils/
  196. visualmetrics/
  197. vulkan/
  198. wayland/
  199. wayland-protocols/
  200. wds/
  201. web-animations-js/
  202. webdriver/
  203. webgl/
  204. webrtc_overrides/
  205. webxr_test_pages/
  206. widevine/
  207. win_build_output/
  208. woff2/
  209. wtl/
  210. xstream/
  211. yara/
  212. yasm/
  213. zlib/
  214. .gitignore
  215. BUILD.gn
  216. DEPS
  217. libjpeg.gni
  218. OWNERS
  219. PRESUBMIT.py
  220. README.chromium
  221. README.chromium.template