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

Side by Side Diff: src/core/SkString.cpp

Issue 12547012: Make GrGLEffects use an interface to append their code. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkString.h ('k') | src/effects/SkBicubicImageFilter.cpp » ('j') | 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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #include "SkString.h" 10 #include "SkString.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 this->set(buffer, strlen(buffer)); 524 this->set(buffer, strlen(buffer));
525 } 525 }
526 526
527 void SkString::appendf(const char format[], ...) { 527 void SkString::appendf(const char format[], ...) {
528 char buffer[kBufferSize]; 528 char buffer[kBufferSize];
529 ARGS_TO_BUFFER(format, buffer, kBufferSize); 529 ARGS_TO_BUFFER(format, buffer, kBufferSize);
530 530
531 this->append(buffer, strlen(buffer)); 531 this->append(buffer, strlen(buffer));
532 } 532 }
533 533
534 void SkString::appendf(const char format[], va_list args) {
535 char buffer[kBufferSize];
536 VSNPRINTF(buffer, kBufferSize, format, args);
537
538 this->append(buffer, strlen(buffer));
539 }
540
534 void SkString::prependf(const char format[], ...) { 541 void SkString::prependf(const char format[], ...) {
535 char buffer[kBufferSize]; 542 char buffer[kBufferSize];
536 ARGS_TO_BUFFER(format, buffer, kBufferSize); 543 ARGS_TO_BUFFER(format, buffer, kBufferSize);
537 544
538 this->prepend(buffer, strlen(buffer)); 545 this->prepend(buffer, strlen(buffer));
539 } 546 }
540 547
541 /////////////////////////////////////////////////////////////////////////////// 548 ///////////////////////////////////////////////////////////////////////////////
542 549
543 void SkString::remove(size_t offset, size_t length) { 550 void SkString::remove(size_t offset, size_t length) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 SkString SkStringPrintf(const char* format, ...) { 612 SkString SkStringPrintf(const char* format, ...) {
606 SkString formattedOutput; 613 SkString formattedOutput;
607 char buffer[kBufferSize]; 614 char buffer[kBufferSize];
608 ARGS_TO_BUFFER(format, buffer, kBufferSize); 615 ARGS_TO_BUFFER(format, buffer, kBufferSize);
609 formattedOutput.set(buffer); 616 formattedOutput.set(buffer);
610 return formattedOutput; 617 return formattedOutput;
611 } 618 }
612 619
613 #undef VSNPRINTF 620 #undef VSNPRINTF
614 #undef SNPRINTF 621 #undef SNPRINTF
OLDNEW
« no previous file with comments | « include/core/SkString.h ('k') | src/effects/SkBicubicImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698