Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_psfonttracker.cpp
Go to the documentation of this file.
1
// Copyright 2021 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#
include
"core/fxge/win32/cfx_psfonttracker.h"
6
7
#
include
"core/fxge/cfx_font.h"
8
#
include
"third_party/base/check.h"
9
#
include
"third_party/base/containers/contains.h"
10
11
CFX_PSFontTracker
::
CFX_PSFontTracker
() =
default
;
12
13
CFX_PSFontTracker
::~
CFX_PSFontTracker
() =
default
;
14
15
void
CFX_PSFontTracker
::
AddFontObject
(
const
CFX_Font
* font) {
16
uint64_t tag = font
->
GetObjectTag
(
)
;
17
[[maybe_unused]]
bool
inserted;
18
if
(tag != 0) {
19
inserted = seen_font_tags_.insert(tag).second;
20
}
else
{
21
inserted = seen_font_ptrs_.insert(UnownedPtr<
const
CFX_Font>(font)).second;
22
}
23
DCHECK(inserted);
24
}
25
26
bool
CFX_PSFontTracker
::
SeenFontObject
(
const
CFX_Font
* font)
const
{
27
uint64_t tag = font
->
GetObjectTag
(
)
;
28
if
(tag != 0)
29
return
pdfium::Contains(seen_font_tags_, tag);
30
return
pdfium::Contains(seen_font_ptrs_, font);
31
}
CFX_Font
Definition
cfx_font.h:37
CFX_Font::GetObjectTag
uint64_t GetObjectTag() const
Definition
cfx_font.h:127
CFX_PSFontTracker
Definition
cfx_psfonttracker.h:17
CFX_PSFontTracker::~CFX_PSFontTracker
~CFX_PSFontTracker()
CFX_PSFontTracker::CFX_PSFontTracker
CFX_PSFontTracker()
CFX_PSFontTracker::SeenFontObject
bool SeenFontObject(const CFX_Font *font) const
Definition
cfx_psfonttracker.cpp:26
CFX_PSFontTracker::AddFontObject
void AddFontObject(const CFX_Font *font)
Definition
cfx_psfonttracker.cpp:15
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxge
win32
cfx_psfonttracker.cpp
Generated on Sat Sep 21 2024 00:56:38 for Qt by
1.12.0