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

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

Issue 1823573003: Change signatures of filter bounds methods to return a rect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Hide legacy API behind #ifdef; switch callers to new API Created 4 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
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 "SkAutoKern.h" 9 #include "SkAutoKern.h"
10 #include "SkChecksum.h" 10 #include "SkChecksum.h"
(...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 src->fRight + radius, src->fBottom + radius); 2033 src->fRight + radius, src->fBottom + radius);
2034 } else { 2034 } else {
2035 *storage = *src; 2035 *storage = *src;
2036 } 2036 }
2037 2037
2038 if (this->getMaskFilter()) { 2038 if (this->getMaskFilter()) {
2039 this->getMaskFilter()->computeFastBounds(*storage, storage); 2039 this->getMaskFilter()->computeFastBounds(*storage, storage);
2040 } 2040 }
2041 2041
2042 if (this->getImageFilter()) { 2042 if (this->getImageFilter()) {
2043 this->getImageFilter()->computeFastBounds(*storage, storage); 2043 *storage = this->getImageFilter()->computeFastBounds(*storage);
2044 } 2044 }
2045 2045
2046 return *storage; 2046 return *storage;
2047 } 2047 }
2048 2048
2049 #ifndef SK_IGNORE_TO_STRING 2049 #ifndef SK_IGNORE_TO_STRING
2050 2050
2051 void SkPaint::toString(SkString* str) const { 2051 void SkPaint::toString(SkString* str) const {
2052 str->append("<dl><dt>SkPaint:</dt><dd><dl>"); 2052 str->append("<dl><dt>SkPaint:</dt><dd><dl>");
2053 2053
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 } 2362 }
2363 2363
2364 uint32_t SkPaint::getHash() const { 2364 uint32_t SkPaint::getHash() const {
2365 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields, 2365 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields,
2366 // so fBitfields should be 10 pointers and 6 32-bit values from the start. 2366 // so fBitfields should be 10 pointers and 6 32-bit values from the start.
2367 static_assert(offsetof(SkPaint, fBitfields) == 9 * sizeof(void*) + 6 * sizeo f(uint32_t), 2367 static_assert(offsetof(SkPaint, fBitfields) == 9 * sizeof(void*) + 6 * sizeo f(uint32_t),
2368 "SkPaint_notPackedTightly"); 2368 "SkPaint_notPackedTightly");
2369 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), 2369 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this),
2370 offsetof(SkPaint, fBitfields) + sizeof(fBitfields )); 2370 offsetof(SkPaint, fBitfields) + sizeof(fBitfields ));
2371 } 2371 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698