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

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

Issue 821083002: add newImage API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: check when subset == bounds Created 5 years, 11 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/core/SkPaint.h ('k') | src/image/SkImage.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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 && EQUAL(fBitfieldsUInt) 164 && EQUAL(fBitfieldsUInt)
165 ; 165 ;
166 #undef EQUAL 166 #undef EQUAL
167 } 167 }
168 168
169 void SkPaint::reset() { 169 void SkPaint::reset() {
170 SkPaint init; 170 SkPaint init;
171 *this = init; 171 *this = init;
172 } 172 }
173 173
174 void SkPaint::setFilterLevel(FilterLevel level) { 174 void SkPaint::setFilterQuality(SkFilterQuality quality) {
175 fBitfields.fFilterLevel = level; 175 fBitfields.fFilterQuality = quality;
176 } 176 }
177 177
178 void SkPaint::setHinting(Hinting hintingLevel) { 178 void SkPaint::setHinting(Hinting hintingLevel) {
179 fBitfields.fHinting = hintingLevel; 179 fBitfields.fHinting = hintingLevel;
180 } 180 }
181 181
182 void SkPaint::setFlags(uint32_t flags) { 182 void SkPaint::setFlags(uint32_t flags) {
183 fBitfields.fFlags = flags; 183 fBitfields.fFlags = flags;
184 } 184 }
185 185
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 } 2383 }
2384 2384
2385 uint32_t SkPaint::getHash() const { 2385 uint32_t SkPaint::getHash() const {
2386 // 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,
2387 // 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.
2388 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),
2389 SkPaint_notPackedTightly); 2389 SkPaint_notPackedTightly);
2390 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), 2390 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this),
2391 offsetof(SkPaint, fBitfields) + sizeof(fBitfields )); 2391 offsetof(SkPaint, fBitfields) + sizeof(fBitfields ));
2392 } 2392 }
OLDNEW
« no previous file with comments | « include/core/SkPaint.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698