OLD | NEW |
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 | 9 |
10 #include "SkTransparentShader.h" | 10 #include "SkTransparentShader.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 void SkTransparentShader::shadeSpan16(int x, int y, uint16_t span[], int count)
{ | 100 void SkTransparentShader::shadeSpan16(int x, int y, uint16_t span[], int count)
{ |
101 SkASSERT(fDevice->colorType() == kRGB_565_SkColorType); | 101 SkASSERT(fDevice->colorType() == kRGB_565_SkColorType); |
102 | 102 |
103 uint16_t* src = fDevice->getAddr16(x, y); | 103 uint16_t* src = fDevice->getAddr16(x, y); |
104 if (src != span) { | 104 if (src != span) { |
105 memcpy(span, src, count << 1); | 105 memcpy(span, src, count << 1); |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 #ifdef SK_DEVELOPER | 109 #ifndef SK_IGNORE_TO_STRING |
110 void SkTransparentShader::toString(SkString* str) const { | 110 void SkTransparentShader::toString(SkString* str) const { |
111 str->append("SkTransparentShader: ("); | 111 str->append("SkTransparentShader: ("); |
112 | 112 |
113 this->INHERITED::toString(str); | 113 this->INHERITED::toString(str); |
114 | 114 |
115 str->append(")"); | 115 str->append(")"); |
116 } | 116 } |
117 #endif | 117 #endif |
OLD | NEW |