| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
: face_(std::move(face)), charset_(uCharset) {}Isn't `face_` always going to be non-null here? CHECK() that and delete the null check on line 19 and 27?
std::unique_ptr<CFPF_SkiaFontMgr::Entry> CFPF_SkiaFontMgr::ReportFace(Pre-existing. Since ReportFace() never returns nullptr, I wonder if it can just return an Entry directly.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Nest Entry privately in CFPF_SkiaFontMgr and pass CFX_Face directly toLowercase E
Bypass-Check-License: rename below in CL chain.Might as well rebase and remove it since all the other ones have landed.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Nest Entry privately in CFPF_SkiaFontMgr and pass CFX_Face directly toTom SepezLowercase E
Actually its a class, clarified.
Might as well rebase and remove it since all the other ones have landed.
Done.
Isn't `face_` always going to be non-null here? CHECK() that and delete the null check on line 19 and 27?
Done
std::unique_ptr<CFPF_SkiaFontMgr::Entry> CFPF_SkiaFontMgr::ReportFace(Pre-existing. Since ReportFace() never returns nullptr, I wonder if it can just return an Entry directly.
std::vector<std::unique_ptr<Entry>> font_faces_ means that a resize is more expensive as it copies approx 64 bytes per entry.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: core/fxge/android/cfpf_skiafont.cpp
Insertions: 4, Deletions: 7.
@@ -8,24 +8,21 @@
#include <utility>
+#include "core/fxcrt/check.h"
#include "core/fxcrt/numerics/safe_conversions.h"
CFPF_SkiaFont::CFPF_SkiaFont(RetainPtr<CFX_Face> face, FX_Charset uCharset)
- : face_(std::move(face)), charset_(uCharset) {}
+ : face_(std::move(face)), charset_(uCharset) {
+ CHECK(face_);
+}
CFPF_SkiaFont::~CFPF_SkiaFont() = default;
ByteString CFPF_SkiaFont::GetFamilyName() {
- if (!face_) {
- return ByteString();
- }
return face_->GetFamilyName();
}
uint32_t CFPF_SkiaFont::GetFontData(uint32_t dwTable,
pdfium::span<uint8_t> pBuffer) {
- if (!face_) {
- return 0;
- }
return pdfium::checked_cast<uint32_t>(face_->GetSfntTable(dwTable, pBuffer));
}
```
[Android] Nest font metadata privately in manager
Replace CFPF_SkiaPathFont with a new nested class called `Entry` private
to CFPF_SkiaFontMgr, and pass CFX_Face directly to CFPF_SkiaFont. Delete
cfpf_skiapathfont.h and cfpf_skiapathfont.cpp.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |