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

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

Issue 1829303002: move setshader to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: addressing comments from #8 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
« no previous file with comments | « src/core/SkLightingShader.cpp ('k') | src/effects/SkLayerDrawLooper.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 "SkAutoKern.h" 9 #include "SkAutoKern.h"
10 #include "SkChecksum.h" 10 #include "SkChecksum.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 #define SET_PTR(Field) \ 367 #define SET_PTR(Field) \
368 Sk##Field* SkPaint::set##Field(Sk##Field* f) { \ 368 Sk##Field* SkPaint::set##Field(Sk##Field* f) { \
369 this->f##Field.reset(SkSafeRef(f)); \ 369 this->f##Field.reset(SkSafeRef(f)); \
370 return f; \ 370 return f; \
371 } 371 }
372 SET_PTR(Typeface) 372 SET_PTR(Typeface)
373 #ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR 373 #ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR
374 SET_PTR(Rasterizer) 374 SET_PTR(Rasterizer)
375 #endif 375 #endif
376 SET_PTR(ImageFilter) 376 SET_PTR(ImageFilter)
377 #ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
377 SET_PTR(Shader) 378 SET_PTR(Shader)
379 #endif
378 #ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR 380 #ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
379 SET_PTR(ColorFilter) 381 SET_PTR(ColorFilter)
380 #endif 382 #endif
381 SET_PTR(Xfermode) 383 SET_PTR(Xfermode)
382 #ifdef SK_SUPPORT_LEGACY_PATHEFFECT_PTR 384 #ifdef SK_SUPPORT_LEGACY_PATHEFFECT_PTR
383 SET_PTR(PathEffect) 385 SET_PTR(PathEffect)
384 #endif 386 #endif
385 SET_PTR(MaskFilter) 387 SET_PTR(MaskFilter)
386 #undef SET_PTR 388 #undef SET_PTR
387 389
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 } 2355 }
2354 2356
2355 uint32_t SkPaint::getHash() const { 2357 uint32_t SkPaint::getHash() const {
2356 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields, 2358 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields,
2357 // so fBitfields should be 10 pointers and 6 32-bit values from the start. 2359 // so fBitfields should be 10 pointers and 6 32-bit values from the start.
2358 static_assert(offsetof(SkPaint, fBitfields) == 9 * sizeof(void*) + 6 * sizeo f(uint32_t), 2360 static_assert(offsetof(SkPaint, fBitfields) == 9 * sizeof(void*) + 6 * sizeo f(uint32_t),
2359 "SkPaint_notPackedTightly"); 2361 "SkPaint_notPackedTightly");
2360 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), 2362 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this),
2361 offsetof(SkPaint, fBitfields) + sizeof(fBitfields )); 2363 offsetof(SkPaint, fBitfields) + sizeof(fBitfields ));
2362 } 2364 }
OLDNEW
« no previous file with comments | « src/core/SkLightingShader.cpp ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698