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

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

Issue 263883006: add release-mode checks for null, at least for a while (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkTLazy.h ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkAnnotation.h" 10 #include "SkAnnotation.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 fHinting = SkPaintDefaults_Hinting; 100 fHinting = SkPaintDefaults_Hinting;
101 101
102 fDirtyBits = 0; 102 fDirtyBits = 0;
103 #ifdef SK_BUILD_FOR_ANDROID 103 #ifdef SK_BUILD_FOR_ANDROID
104 new (&fPaintOptionsAndroid) SkPaintOptionsAndroid; 104 new (&fPaintOptionsAndroid) SkPaintOptionsAndroid;
105 fGenerationID = 0; 105 fGenerationID = 0;
106 #endif 106 #endif
107 } 107 }
108 108
109 SkPaint::SkPaint(const SkPaint& src) { 109 SkPaint::SkPaint(const SkPaint& src) {
110 // Diagnoistic. May remove later. See crbug.com/364224
111 if (NULL == &src) {
112 sk_throw();
113 }
114
110 #define COPY(field) field = src.field 115 #define COPY(field) field = src.field
111 #define REF_COPY(field) field = SkSafeRef(src.field) 116 #define REF_COPY(field) field = SkSafeRef(src.field)
112 117
113 REF_COPY(fTypeface); 118 REF_COPY(fTypeface);
114 REF_COPY(fPathEffect); 119 REF_COPY(fPathEffect);
115 REF_COPY(fShader); 120 REF_COPY(fShader);
116 REF_COPY(fXfermode); 121 REF_COPY(fXfermode);
117 REF_COPY(fMaskFilter); 122 REF_COPY(fMaskFilter);
118 REF_COPY(fColorFilter); 123 REF_COPY(fColorFilter);
119 REF_COPY(fRasterizer); 124 REF_COPY(fRasterizer);
(...skipping 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 } 2736 }
2732 #ifdef SK_BUILD_FOR_ANDROID 2737 #ifdef SK_BUILD_FOR_ANDROID
2733 if (dirty & kPaintOptionsAndroid_DirtyBit) { 2738 if (dirty & kPaintOptionsAndroid_DirtyBit) {
2734 SkPaintOptionsAndroid options; 2739 SkPaintOptionsAndroid options;
2735 options.unflatten(buffer); 2740 options.unflatten(buffer);
2736 paint->setPaintOptionsAndroid(options); 2741 paint->setPaintOptionsAndroid(options);
2737 } 2742 }
2738 #endif 2743 #endif
2739 SkASSERT(dirty == paint->fDirtyBits); 2744 SkASSERT(dirty == paint->fDirtyBits);
2740 } 2745 }
OLDNEW
« no previous file with comments | « include/core/SkTLazy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698