commit | 622af2ab121fa62e79c6549e1e456f31fcf50c47 | [log] [tgz] |
---|---|---|
author | Xianzhu Wang <wangxianzhu@chromium.org> | Tue Dec 17 01:20:24 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Dec 17 01:20:24 2024 |
tree | beb5f4b94f4fe34b8d470436a403d11cfec63bab | |
parent | 2811cf9bf3fa12ec3b5a9f1f16e6b539902e6055 [diff] |
Refactor PaintOp classes to prevent (and fix) wrong usages PaintOp is not runtime polymorphic by itself, but implements runtime polymorphism with manual subclass dispatching. Most of the non-virtual functions defined in PaintOp are supposed to be called from leaf subclasses only. Calling them from an object with compile-time PaintOp type may get wrong results. This CL makes these functions protected in PaintOp[WithFlags] to prevent them from being called from outside. They are made public in PaintOp[WithFlags]InternalBase classes which are the parent class of all real paint op classes. Two problems (for tracing and metrics, not affecting rendering) are fixed: - DisplayItemList::Raster() incorrectly called PaintOp::AdditionalOpCount() for tracing. - DisplayItemList:AreaOfDrawText() missed some ops (e.g. DrawScrollingContentsOp) containing draw text ops partly due to lack of PaintOp::OpHasDrawTextOps() (added and used in this CL). Change-Id: Iaf638cfd3286c4df0ac82b75ccc28524188c1ead Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072123 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/main@{#1397094}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.