| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void SkTransparentShader::TransparentShaderContext::shadeSpan16(int x, int y, ui
nt16_t span[], | 108 void SkTransparentShader::TransparentShaderContext::shadeSpan16(int x, int y, ui
nt16_t span[], |
| 109 int count) { | 109 int count) { |
| 110 SkASSERT(fDevice->colorType() == kRGB_565_SkColorType); | 110 SkASSERT(fDevice->colorType() == kRGB_565_SkColorType); |
| 111 | 111 |
| 112 uint16_t* src = fDevice->getAddr16(x, y); | 112 uint16_t* src = fDevice->getAddr16(x, y); |
| 113 if (src != span) { | 113 if (src != span) { |
| 114 memcpy(span, src, count << 1); | 114 memcpy(span, src, count << 1); |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 | 117 |
| 118 SkFlattenable* SkTransparentShader::CreateProc(SkReadBuffer& buffer) { |
| 119 return SkNEW(SkTransparentShader); |
| 120 } |
| 121 |
| 118 #ifndef SK_IGNORE_TO_STRING | 122 #ifndef SK_IGNORE_TO_STRING |
| 119 void SkTransparentShader::toString(SkString* str) const { | 123 void SkTransparentShader::toString(SkString* str) const { |
| 120 str->append("SkTransparentShader: ("); | 124 str->append("SkTransparentShader: ("); |
| 121 | 125 |
| 122 this->INHERITED::toString(str); | 126 this->INHERITED::toString(str); |
| 123 | 127 |
| 124 str->append(")"); | 128 str->append(")"); |
| 125 } | 129 } |
| 126 #endif | 130 #endif |
| OLD | NEW |