Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1459)

Unified Diff: third_party/ots/include/opentype-sanitiser.h

Issue 1252363005: Update OTS to revision a7a3b94 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/ots/configure.ac ('k') | third_party/ots/src/cff.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/ots/include/opentype-sanitiser.h
diff --git a/third_party/ots/include/opentype-sanitiser.h b/third_party/ots/include/opentype-sanitiser.h
index 285a438979ca704e712625e9225378c52f02c58d..0343cdcc9c7731b7c0aa04d6c7d2583a8eddd925 100644
--- a/third_party/ots/include/opentype-sanitiser.h
+++ b/third_party/ots/include/opentype-sanitiser.h
@@ -89,7 +89,7 @@ class OTSStream {
virtual bool Pad(size_t bytes) {
static const uint32_t kZero = 0;
while (bytes >= 4) {
- if (!WriteTag(kZero)) return false;
+ if (!Write(&kZero, 4)) return false;
bytes -= 4;
}
while (bytes) {
@@ -133,10 +133,6 @@ class OTSStream {
return Write(&v, sizeof(v));
}
- bool WriteTag(uint32_t v) {
- return Write(&v, sizeof(v));
- }
-
void ResetChecksum() {
assert((Tell() & 3) == 0);
chksum_ = 0;
@@ -174,7 +170,10 @@ class OTSContext {
// partial output may have been written.
// input: the OpenType file
// length: the size, in bytes, of |input|
- bool Process(OTSStream *output, const uint8_t *input, size_t length);
+ // index: if the input is a font collection and index is specified, then
+ // the corresponding font will be returned, otherwise the whole
+ // collection. Ignored for non-collection fonts.
+ bool Process(OTSStream *output, const uint8_t *input, size_t length, uint32_t index = -1);
// This function will be called when OTS is reporting an error.
// level: the severity of the generated message:
« no previous file with comments | « third_party/ots/configure.ac ('k') | third_party/ots/src/cff.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698