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

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

Issue 1768433003: remove align16 calls in skhader context sizes. will handle this elsewhere as needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | src/core/SkBlitter.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapProcShader.h" 8 #include "SkBitmapProcShader.h"
9 #include "SkBitmapProcState.h" 9 #include "SkBitmapProcState.h"
10 #include "SkBitmapProvider.h" 10 #include "SkBitmapProvider.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 SkBitmapProcState* fState; 113 SkBitmapProcState* fState;
114 114
115 typedef BitmapProcInfoContext INHERITED; 115 typedef BitmapProcInfoContext INHERITED;
116 }; 116 };
117 117
118 //////////////////////////////////////////////////////////////////////////////// /////////////////// 118 //////////////////////////////////////////////////////////////////////////////// ///////////////////
119 119
120 size_t SkBitmapProcShader::ContextSize(const ContextRec& rec) { 120 size_t SkBitmapProcShader::ContextSize(const ContextRec& rec) {
121 // The SkBitmapProcState is stored outside of the context object, with the c ontext holding 121 // The SkBitmapProcState is stored outside of the context object, with the c ontext holding
122 // a pointer to it. 122 // a pointer to it.
123 return SkAlign16(sizeof(BitmapProcShaderContext) + sizeof(SkBitmapProcState) ); 123 return sizeof(BitmapProcShaderContext) + sizeof(SkBitmapProcState);
124 } 124 }
125 125
126 SkShader::Context* SkBitmapProcShader::MakeContext(const SkShader& shader, 126 SkShader::Context* SkBitmapProcShader::MakeContext(const SkShader& shader,
127 TileMode tmx, TileMode tmy, 127 TileMode tmx, TileMode tmy,
128 const SkBitmapProvider& provi der, 128 const SkBitmapProvider& provi der,
129 const ContextRec& rec, void* storage) { 129 const ContextRec& rec, void* storage) {
130 SkMatrix totalInverse; 130 SkMatrix totalInverse;
131 // Do this first, so we know the matrix can be inverted. 131 // Do this first, so we know the matrix can be inverted.
132 if (!shader.computeTotalInverse(rec, &totalInverse)) { 132 if (!shader.computeTotalInverse(rec, &totalInverse)) {
133 return nullptr; 133 return nullptr;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params)); 353 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params));
354 } 354 }
355 355
356 if (kAlpha_8_SkColorType == fRawBitmap.colorType()) { 356 if (kAlpha_8_SkColorType == fRawBitmap.colorType()) {
357 return GrFragmentProcessor::MulOutputByInputUnpremulColor(inner); 357 return GrFragmentProcessor::MulOutputByInputUnpremulColor(inner);
358 } 358 }
359 return GrFragmentProcessor::MulOutputByInputAlpha(inner); 359 return GrFragmentProcessor::MulOutputByInputAlpha(inner);
360 } 360 }
361 361
362 #endif 362 #endif
OLDNEW
« no previous file with comments | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698