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

Side by Side Diff: src/effects/SkKernel33MaskFilter.cpp

Issue 197763008: Allow toString capability to be toggled independent of developer mode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove gyp changes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkEmbossMaskFilter.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #include "SkKernel33MaskFilter.h" 8 #include "SkKernel33MaskFilter.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void SkKernel33ProcMaskFilter::flatten(SkWriteBuffer& wb) const { 79 void SkKernel33ProcMaskFilter::flatten(SkWriteBuffer& wb) const {
80 this->INHERITED::flatten(wb); 80 this->INHERITED::flatten(wb);
81 wb.writeInt(fPercent256); 81 wb.writeInt(fPercent256);
82 } 82 }
83 83
84 SkKernel33ProcMaskFilter::SkKernel33ProcMaskFilter(SkReadBuffer& rb) 84 SkKernel33ProcMaskFilter::SkKernel33ProcMaskFilter(SkReadBuffer& rb)
85 : SkMaskFilter(rb) { 85 : SkMaskFilter(rb) {
86 fPercent256 = rb.readInt(); 86 fPercent256 = rb.readInt();
87 } 87 }
88 88
89 #ifdef SK_DEVELOPER 89 #ifndef SK_IGNORE_TO_STRING
90 void SkKernel33ProcMaskFilter::toString(SkString* str) const { 90 void SkKernel33ProcMaskFilter::toString(SkString* str) const {
91 str->appendf("percent256: %d, ", fPercent256); 91 str->appendf("percent256: %d, ", fPercent256);
92 } 92 }
93 #endif 93 #endif
94 94
95 /////////////////////////////////////////////////////////////////////////////// 95 ///////////////////////////////////////////////////////////////////////////////
96 96
97 uint8_t SkKernel33MaskFilter::computeValue(uint8_t* const* srcRows) const { 97 uint8_t SkKernel33MaskFilter::computeValue(uint8_t* const* srcRows) const {
98 int value = 0; 98 int value = 0;
99 99
(...skipping 19 matching lines...) Expand all
119 wb.writeInt(fShift); 119 wb.writeInt(fShift);
120 } 120 }
121 121
122 SkKernel33MaskFilter::SkKernel33MaskFilter(SkReadBuffer& rb) 122 SkKernel33MaskFilter::SkKernel33MaskFilter(SkReadBuffer& rb)
123 : SkKernel33ProcMaskFilter(rb) { 123 : SkKernel33ProcMaskFilter(rb) {
124 SkDEBUGCODE(bool success = )rb.readIntArray(&fKernel[0][0], 9); 124 SkDEBUGCODE(bool success = )rb.readIntArray(&fKernel[0][0], 9);
125 SkASSERT(success); 125 SkASSERT(success);
126 fShift = rb.readInt(); 126 fShift = rb.readInt();
127 } 127 }
128 128
129 #ifdef SK_DEVELOPER 129 #ifndef SK_IGNORE_TO_STRING
130 void SkKernel33MaskFilter::toString(SkString* str) const { 130 void SkKernel33MaskFilter::toString(SkString* str) const {
131 str->append("SkKernel33MaskFilter: ("); 131 str->append("SkKernel33MaskFilter: (");
132 132
133 str->appendf("kernel: (%d, %d, %d, %d, %d, %d, %d, %d, %d), ", 133 str->appendf("kernel: (%d, %d, %d, %d, %d, %d, %d, %d, %d), ",
134 fKernel[0][0], fKernel[0][1], fKernel[0][2], 134 fKernel[0][0], fKernel[0][1], fKernel[0][2],
135 fKernel[1][0], fKernel[1][1], fKernel[1][2], 135 fKernel[1][0], fKernel[1][1], fKernel[1][2],
136 fKernel[2][0], fKernel[2][1], fKernel[2][2]); 136 fKernel[2][0], fKernel[2][1], fKernel[2][2]);
137 str->appendf("shift: %d, ", fShift); 137 str->appendf("shift: %d, ", fShift);
138 138
139 this->INHERITED::toString(str); 139 this->INHERITED::toString(str);
140 140
141 str->append(")"); 141 str->append(")");
142 } 142 }
143 #endif 143 #endif
OLDNEW
« no previous file with comments | « src/effects/SkEmbossMaskFilter.cpp ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698