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

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

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify xfermodes, fix SkLayerDrawLooper Created 6 years, 4 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
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 9
10 #include "SkTransparentShader.h" 10 #include "SkTransparentShader.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698