aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImageShaderContext.h
blob: 24f17db114941dfcda15f4281196c09467ae8091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkImageShaderContext_DEFINED
#define SkImageShaderContext_DEFINED

#include "SkBitmapController.h"
#include "SkColor.h"
#include "SkColorTable.h"
#include <memory>

// Definition used by SkImageShader.cpp and SkRasterPipeline_opts.h.
// Otherwise, completely uninteresting.

struct SkImageShaderContext {
    std::unique_ptr<SkBitmapController::State> state;

    const void*   pixels;
    SkColorTable* ctable;
    SkColor4f     color4f;
    int           stride;
    float         width;
    float         height;
    float         matrix[9];
    float         x[8];
    float         y[8];
    float         fx[8];
    float         fy[8];
    float         scalex[8];
    float         scaley[8];
};

#endif//SkImageShaderContext_DEFINED