1 /* 2 * Copyright 2016 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkImageShaderContext_DEFINED 9 #define SkImageShaderContext_DEFINED 10 11 #include "SkBitmapController.h" 12 #include "SkColor.h" 13 #include "SkColorTable.h" 14 #include <memory> 15 16 // Definition used by SkImageShader.cpp and SkRasterPipeline_opts.h. 17 // Otherwise, completely uninteresting. 18 19 struct SkImageShaderContext { 20 std::unique_ptr<SkBitmapController::State> state; 21 22 const void* pixels; 23 SkColorTable* ctable; 24 SkColor4f color4f; 25 int stride; 26 float width; 27 float height; 28 float matrix[9]; 29 float x[8]; 30 float y[8]; 31 float fx[8]; 32 float fy[8]; 33 float scalex[8]; 34 float scaley[8]; 35 }; 36 37 #endif//SkImageShaderContext_DEFINED 38