| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gdef.h" | 5 #include "gdef.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "layout.h" | 9 #include "layout.h" |
| 10 #include "maxp.h" | 10 #include "maxp.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 DROP_THIS_TABLE; | 343 DROP_THIS_TABLE; |
| 344 return true; | 344 return true; |
| 345 } | 345 } |
| 346 } | 346 } |
| 347 gdef->data = data; | 347 gdef->data = data; |
| 348 gdef->length = length; | 348 gdef->length = length; |
| 349 return true; | 349 return true; |
| 350 } | 350 } |
| 351 | 351 |
| 352 bool ots_gdef_should_serialise(OpenTypeFile *file) { | 352 bool ots_gdef_should_serialise(OpenTypeFile *file) { |
| 353 return file->gdef; | 353 return file->gdef != NULL; |
| 354 } | 354 } |
| 355 | 355 |
| 356 bool ots_gdef_serialise(OTSStream *out, OpenTypeFile *file) { | 356 bool ots_gdef_serialise(OTSStream *out, OpenTypeFile *file) { |
| 357 if (!out->Write(file->gdef->data, file->gdef->length)) { | 357 if (!out->Write(file->gdef->data, file->gdef->length)) { |
| 358 return OTS_FAILURE(); | 358 return OTS_FAILURE(); |
| 359 } | 359 } |
| 360 | 360 |
| 361 return true; | 361 return true; |
| 362 } | 362 } |
| 363 | 363 |
| 364 void ots_gdef_free(OpenTypeFile *file) { | 364 void ots_gdef_free(OpenTypeFile *file) { |
| 365 delete file->gdef; | 365 delete file->gdef; |
| 366 } | 366 } |
| 367 | 367 |
| 368 } // namespace ots | 368 } // namespace ots |
| 369 | 369 |
| OLD | NEW |