New issue
Advanced search Search tips

Issue 616969 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Remove unnecessary copy when decoding web font

Project Member Reported by bashi@chromium.org, Jun 3 2016

Issue description

When blink decodes a web font it creates following objects:

SharedBuffer -> ots::ExpandandingMemoryStream -> SharedBuffer -> SkData -> SkStream -> SkTypeface

Since we can create SkData from a chunk of memory we don't need to create a temporary SharedBuffer.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f4e652e1603fdc1c59afc235261648cac4d3ba1e

commit f4e652e1603fdc1c59afc235261648cac4d3ba1e
Author: bashi <bashi@chromium.org>
Date: Fri Jun 03 06:39:28 2016

Avoid one temporary copy on web fonts decoding

Before this CL, we allocated a temporary SharedBuffer to store decoded
font data. Since the decoded data is only used to create SkTypeface we don't
need to have such abstraction. Create SkTypeface directly from the decoded
data. This CL also renamed and moved platform/fonts/opentype/OpenTypeSanitizer
to platform/fonts/WebFontDecoder for better naming.

BUG= 616969 

Review-Url: https://codereview.chromium.org/2032943002
Cr-Commit-Position: refs/heads/master@{#397648}

[modify] https://crrev.com/f4e652e1603fdc1c59afc235261648cac4d3ba1e/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/f4e652e1603fdc1c59afc235261648cac4d3ba1e/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/f4e652e1603fdc1c59afc235261648cac4d3ba1e/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
[rename] https://crrev.com/f4e652e1603fdc1c59afc235261648cac4d3ba1e/third_party/WebKit/Source/platform/fonts/WebFontDecoder.cpp
[rename] https://crrev.com/f4e652e1603fdc1c59afc235261648cac4d3ba1e/third_party/WebKit/Source/platform/fonts/WebFontDecoder.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bccb6c12ac0d2dcf3b2554a0405cd1dea47abbfd

commit bccb6c12ac0d2dcf3b2554a0405cd1dea47abbfd
Author: fs <fs@opera.com>
Date: Fri Jun 03 12:04:36 2016

Update Win7 baseline for fast/text/emoji-web-font.html

TBR=bashi@chromium.org
BUG= 616969 

Review-Url: https://codereview.chromium.org/2033403002
Cr-Commit-Position: refs/heads/master@{#397687}

[delete] https://crrev.com/e22ff8c96ff8b3fa85e1f51b98daf27d5e68a09d/third_party/WebKit/LayoutTests/platform/win7/fast/text/emoji-web-font-expected.txt

Comment 4 by bashi@chromium.org, Jun 6 2016

Status: Fixed (was: Started)

Sign in to add a comment