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

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

Issue 491673002: Initial refactor of shaderbuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « include/gpu/GrEffect.h ('k') | src/core/SkXfermode.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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 this->append(buffer, strlen(buffer)); 576 this->append(buffer, strlen(buffer));
577 } 577 }
578 578
579 void SkString::prependf(const char format[], ...) { 579 void SkString::prependf(const char format[], ...) {
580 char buffer[kBufferSize]; 580 char buffer[kBufferSize];
581 ARGS_TO_BUFFER(format, buffer, kBufferSize); 581 ARGS_TO_BUFFER(format, buffer, kBufferSize);
582 582
583 this->prepend(buffer, strlen(buffer)); 583 this->prepend(buffer, strlen(buffer));
584 } 584 }
585 585
586 void SkString::prependVAList(const char format[], va_list args) {
587 char buffer[kBufferSize];
588 VSNPRINTF(buffer, kBufferSize, format, args);
589
590 this->prepend(buffer, strlen(buffer));
591 }
592
593
586 /////////////////////////////////////////////////////////////////////////////// 594 ///////////////////////////////////////////////////////////////////////////////
587 595
588 void SkString::remove(size_t offset, size_t length) { 596 void SkString::remove(size_t offset, size_t length) {
589 size_t size = this->size(); 597 size_t size = this->size();
590 598
591 if (offset < size) { 599 if (offset < size) {
592 if (length > size - offset) { 600 if (length > size - offset) {
593 length = size - offset; 601 length = size - offset;
594 } 602 }
595 SkASSERT(length <= size); 603 SkASSERT(length <= size);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 const size_t len = strcspn(str, delimiters); 647 const size_t len = strcspn(str, delimiters);
640 out->push_back().set(str, len); 648 out->push_back().set(str, len);
641 str += len; 649 str += len;
642 // Skip any delimiters. 650 // Skip any delimiters.
643 str += strspn(str, delimiters); 651 str += strspn(str, delimiters);
644 } 652 }
645 } 653 }
646 654
647 #undef VSNPRINTF 655 #undef VSNPRINTF
648 #undef SNPRINTF 656 #undef SNPRINTF
OLDNEW
« no previous file with comments | « include/gpu/GrEffect.h ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698