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

Side by Side Diff: src/pdf/SkPDFTypes.cpp

Issue 1107923002: SkPDF: clean up uses of deprecated calls in other SkPDF classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-04-27 (Monday) 09:04:15 EDT Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFTypes.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkPDFTypes.h" 9 #include "SkPDFTypes.h"
10 #include "SkStream.h" 10 #include "SkStream.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 void SkPDFDict::insertObject(const SkString& key, SkPDFObject* value) { 511 void SkPDFDict::insertObject(const SkString& key, SkPDFObject* value) {
512 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(value)); 512 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(value));
513 } 513 }
514 514
515 // DEPRECATED 515 // DEPRECATED
516 SkPDFObject* SkPDFDict::insert(const char key[], SkPDFObject* value) { 516 SkPDFObject* SkPDFDict::insert(const char key[], SkPDFObject* value) {
517 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(SkRef(value))); 517 this->set(SkPDFUnion::Name(key), SkPDFUnion::Object(SkRef(value)));
518 return value; 518 return value;
519 } 519 }
520 520
521 void SkPDFDict::insertBool(const char key[], bool value) {
522 this->set(SkPDFUnion::Name(key), SkPDFUnion::Bool(value));
523 }
524
521 void SkPDFDict::insertInt(const char key[], int32_t value) { 525 void SkPDFDict::insertInt(const char key[], int32_t value) {
522 this->set(SkPDFUnion::Name(key), SkPDFUnion::Int(value)); 526 this->set(SkPDFUnion::Name(key), SkPDFUnion::Int(value));
523 } 527 }
524 528
525 void SkPDFDict::insertInt(const char key[], size_t value) { 529 void SkPDFDict::insertInt(const char key[], size_t value) {
526 this->insertInt(key, SkToS32(value)); 530 this->insertInt(key, SkToS32(value));
527 } 531 }
528 532
529 void SkPDFDict::insertScalar(const char key[], SkScalar value) { 533 void SkPDFDict::insertScalar(const char key[], SkScalar value) {
530 this->set(SkPDFUnion::Name(key), SkPDFUnion::Scalar(value)); 534 this->set(SkPDFUnion::Name(key), SkPDFUnion::Scalar(value));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 fObjects.push(obj); 587 fObjects.push(obj);
584 return true; 588 return true;
585 } 589 }
586 590
587 int32_t SkPDFObjNumMap::getObjectNumber(SkPDFObject* obj) const { 591 int32_t SkPDFObjNumMap::getObjectNumber(SkPDFObject* obj) const {
588 int32_t* objectNumberFound = fObjectNumbers.find(obj); 592 int32_t* objectNumberFound = fObjectNumbers.find(obj);
589 SkASSERT(objectNumberFound); 593 SkASSERT(objectNumberFound);
590 return *objectNumberFound; 594 return *objectNumberFound;
591 } 595 }
592 596
OLDNEW
« no previous file with comments | « src/pdf/SkPDFTypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698