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

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

Issue 325603002: Clean up Skia for Clang's -Wtautological-undefined-compare (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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/SkTLazy.h ('k') | src/core/SkRegion.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 fHinting = SkPaintDefaults_Hinting; 99 fHinting = SkPaintDefaults_Hinting;
100 100
101 fDirtyBits = 0; 101 fDirtyBits = 0;
102 #ifdef SK_BUILD_FOR_ANDROID 102 #ifdef SK_BUILD_FOR_ANDROID
103 new (&fPaintOptionsAndroid) SkPaintOptionsAndroid; 103 new (&fPaintOptionsAndroid) SkPaintOptionsAndroid;
104 fGenerationID = 0; 104 fGenerationID = 0;
105 #endif 105 #endif
106 } 106 }
107 107
108 SkPaint::SkPaint(const SkPaint& src) { 108 SkPaint::SkPaint(const SkPaint& src) {
109 // Diagnoistic. May remove later. See crbug.com/364224
110 if (NULL == &src) {
111 sk_throw();
112 }
113
114 #define COPY(field) field = src.field 109 #define COPY(field) field = src.field
115 #define REF_COPY(field) field = SkSafeRef(src.field) 110 #define REF_COPY(field) field = SkSafeRef(src.field)
116 111
117 REF_COPY(fTypeface); 112 REF_COPY(fTypeface);
118 REF_COPY(fPathEffect); 113 REF_COPY(fPathEffect);
119 REF_COPY(fShader); 114 REF_COPY(fShader);
120 REF_COPY(fXfermode); 115 REF_COPY(fXfermode);
121 REF_COPY(fMaskFilter); 116 REF_COPY(fMaskFilter);
122 REF_COPY(fColorFilter); 117 REF_COPY(fColorFilter);
123 REF_COPY(fRasterizer); 118 REF_COPY(fRasterizer);
(...skipping 2610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 } 2729 }
2735 #ifdef SK_BUILD_FOR_ANDROID 2730 #ifdef SK_BUILD_FOR_ANDROID
2736 if (dirty & kPaintOptionsAndroid_DirtyBit) { 2731 if (dirty & kPaintOptionsAndroid_DirtyBit) {
2737 SkPaintOptionsAndroid options; 2732 SkPaintOptionsAndroid options;
2738 options.unflatten(buffer); 2733 options.unflatten(buffer);
2739 paint->setPaintOptionsAndroid(options); 2734 paint->setPaintOptionsAndroid(options);
2740 } 2735 }
2741 #endif 2736 #endif
2742 SkASSERT(dirty == paint->fDirtyBits); 2737 SkASSERT(dirty == paint->fDirtyBits);
2743 } 2738 }
OLDNEW
« no previous file with comments | « include/core/SkTLazy.h ('k') | src/core/SkRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698