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

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

Issue 789163006: Add toString methods to SkImageFilter-derived classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make sure leading 0's aren't stripped off colors Created 6 years 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/effects/SkXfermodeImageFilter.h ('k') | src/effects/SkAlphaThresholdFilter.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPaint.h" 8 #include "SkPaint.h"
9 #include "SkAnnotation.h" 9 #include "SkAnnotation.h"
10 #include "SkAutoKern.h" 10 #include "SkAutoKern.h"
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 SkDrawLooper* looper = this->getLooper(); 2153 SkDrawLooper* looper = this->getLooper();
2154 if (looper) { 2154 if (looper) {
2155 str->append("<dt>DrawLooper:</dt><dd>"); 2155 str->append("<dt>DrawLooper:</dt><dd>");
2156 looper->toString(str); 2156 looper->toString(str);
2157 str->append("</dd>"); 2157 str->append("</dd>");
2158 } 2158 }
2159 2159
2160 SkImageFilter* imageFilter = this->getImageFilter(); 2160 SkImageFilter* imageFilter = this->getImageFilter();
2161 if (imageFilter) { 2161 if (imageFilter) {
2162 str->append("<dt>ImageFilter:</dt><dd>"); 2162 str->append("<dt>ImageFilter:</dt><dd>");
2163 imageFilter->toString(str);
2163 str->append("</dd>"); 2164 str->append("</dd>");
2164 } 2165 }
2165 2166
2166 SkAnnotation* annotation = this->getAnnotation(); 2167 SkAnnotation* annotation = this->getAnnotation();
2167 if (annotation) { 2168 if (annotation) {
2168 str->append("<dt>Annotation:</dt><dd>"); 2169 str->append("<dt>Annotation:</dt><dd>");
2169 str->append("</dd>"); 2170 str->append("</dd>");
2170 } 2171 }
2171 2172
2172 str->append("<dt>Color:</dt><dd>0x"); 2173 str->append("<dt>Color:</dt><dd>0x");
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 } 2383 }
2383 2384
2384 uint32_t SkPaint::getHash() const { 2385 uint32_t SkPaint::getHash() const {
2385 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields, 2386 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields,
2386 // so fBitfields should be 10 pointers and 6 32-bit values from the start. 2387 // so fBitfields should be 10 pointers and 6 32-bit values from the start.
2387 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * sizeof(uint32_t), 2388 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * sizeof(uint32_t),
2388 SkPaint_notPackedTightly); 2389 SkPaint_notPackedTightly);
2389 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), 2390 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this),
2390 offsetof(SkPaint, fBitfields) + sizeof(fBitfields )); 2391 offsetof(SkPaint, fBitfields) + sizeof(fBitfields ));
2391 } 2392 }
OLDNEW
« no previous file with comments | « include/effects/SkXfermodeImageFilter.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698