0
Commit Graph

12 Commits

Author SHA1 Message Date
Ari Chivukula
609ffb0b71 Clean up stale base::Feature "SmallerFontCache"
This has been enabled by default since 2022:
https://chromium-review.googlesource.com/c/chromium/src/+/3999284
Let's enforce it by default without the flag, but allow the switches to
modify the limits if needed.

Fixed: 356623897
Change-Id: I0f36a1cfc72fc5bef92cb916079a9085e6d8cd56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097690
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397224}
2024-12-17 03:22:27 -08:00
Brian Osman
e687df1977 Remove staging code for Skia analytic antialiasing
I previously added code to migrate individual test suites to Skia's
higher quality analytic antialiasing. At this point, analytic AA is
always enabled (via #define), so this staging code is unnecessary.

Bug: chromium:1421297
Change-Id: Ie2f779ab39df7912c40210d3db1ca76ccd6e8886
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4468568
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1136464}
2023-04-27 12:48:35 +00:00
Takashi Sakamoto
ad4404ffa8 Add PartialLowEndModeOnMidRangeDevices feature.
Add PartialLowEndModeOnMidRangeDevices feature for Android 4GB and
6GB devices.
Such devices aren't considered low-end, but we'd like experiment with a subset of low-end features to see if we get a good memory vs. performance tradeoff.
We will not introduce any user-visible changes which cause bad UX or
any huge performance regressions by the experiment. So not all
base::SysInfo::IsLowEndDevice() are replaced with base::SysInfo::
IsLowEndDeviceOrPartialLowEndModeEnabled().

Bug: 1434873
Change-Id: I90db4bf9926435f0550721b79b90a02b24ae6e8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4450827
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1135064}
2023-04-25 06:23:27 +00:00
Brian Osman
2e3b2f8e0f Respect force-skia-analytic-aa switch for in-process browser tests
Tests that rendered in the GPU or renderer processes were working
correctly. But (some) tests that rendered in the browser process were
never calling InitializeSkia, so the flag was ignored.

Bug: chromium:1421297
Change-Id: I62f31d0317dfd447e8256a2a5f2d5bde76f3c180
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4340773
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1117544}
2023-03-15 15:50:26 +00:00
Brian Osman
85645dee2a Add force-skia-analytic-aa switch to control Skia's AA algorithm
Temporary tool to migrate browser tests to the new algorithm.

Low-Coverage-Reason: Optional flag, will start exercising in follow-up CLs (that enable the flag for tests, but require rebaselines).
Bug: chromium:1421297
Change-Id: I176ad3141e04f306a60b4b888fee26ac1741c768
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4317109
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1115246}
2023-03-09 18:46:15 +00:00
Benoit Lize
240ad5c56d [gpu] Enable the small(er) skia glyph cache by default
Shrinking (and unifying) the skia glyph cache size limit improves memory
usage across platforms, without regressing performance.

On macOS, from the 10% stable field trial
(https://uma.googleplex.com/p/chrome/variations?sid=52fe18b48c1993b6cd8281c84394a22c),
this moves the maximum cache size from 20MiB (as reported by Skia,
i.e. excluding the custom arena allocator overhead) to 1MiB. Results
are:
- Cache size: 15MiB -> .5MiB @50p, 20.8MiB -> 1MiB @99p
- GPU malloc: -25MiB @50p (25%), -30MiB @95p (11%)
- GPU process PMF: -5.8% @50p, -1.8% @95p

Results are similar on other platforms, with a smaller impact on Android
(fewer fonts in cache, and smaller limits) and on Windows (limited to
256 SkStrikes).

Bug: 1335342
Change-Id: Ic3f924366b00fee8f841e306f9fac81e6097f598
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3999284
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1066929}
2022-11-03 10:57:50 +00:00
Daniel Cheng
0abd9f3f50 Use helper macros to define base::Features in //content
This allows:
- features to be defined with a consistent set of qualifiers, and for
  that set of qualifiers to be updated over time as appropriate.
- better PRESUBMIT checks to ensure that base::Features are not defined
  in headers.
- simplifies things for scripts trying to extract feature definitions
  out of C++ code.

Bug: 1364289
Change-Id: I7724959775c6d5013c509b77f3f456582997f6d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3907621
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1050040}
2022-09-22 04:20:11 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Benoit Lize
95243c83b7 [gpu] Add a feature to reduce the size of the skia font cache
The skia font cache is limited to either 1MiB (low-end Android), 8MiB
(Android), or 20MiB (elsewhere). In addition, it cannot cache more than
256 strikes on Windows, and 2048 elsewhere.

The GPU side of the cache might not even be needed (see linked bug), and
the constants were set a long time ago (in some cases, 10 years),
without being revisited since.

This adds a feature to reduce the maximum size of this cache, in order
to investigate the impact on memory and performance. As the feature is
disabled by default, this CL should not change behavior.

Bug: 1335342
Change-Id: If2aa5d26657876f93fca60f2186d07eba1bbec7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3698551
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1013893}
2022-06-14 11:01:33 +00:00
Xiaohan Wang
b317893a6b content/common: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Ic35d7d343d8ea258a14181a5ac4b3534997728c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3373894
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#957330}
2022-01-11 00:08:27 +00:00
Sebastien Marchand
75a7cdfb81 Move the base/sys_info* files to base/system/
This is a part of my effort to cleanup our system-wide metric
measurement code.

TBR=wfh@chromium.org,bartfab@chromium.org,jochen@chromium.org,rsesek@chromium.org,kinuko@chromium.org

Bug: 891864
Change-Id: I896b8936d91789ba0e0423f0937cd54c973bfcda
Reviewed-on: https://chromium-review.googlesource.com/c/1327441
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607813}
2018-11-13 23:47:03 +00:00
Khushal
a4e236f29d content: Initialize skia in the GPU process for OOP raster.
Pull out the common skia initialization setup to a skia_utils used for
skia initialization in both the renderer and GPU.

R=piman@chromium.org

Bug: 844207
Change-Id: I629a7a036def92ede84dbb05f61207ce82762abf
Reviewed-on: https://chromium-review.googlesource.com/1081610
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563506}
2018-06-01 03:00:46 +00:00