| 1 |
/* |
| 2 |
* Copyright 2021 Google LLC |
| 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 GrOpsTypes_DEFINED |
| 9 |
#define GrOpsTypes_DEFINED |
| 10 |
|
| 11 |
#include "include/core/SkMatrix.h" |
| 12 |
#include "include/core/SkRect.h" |
| 13 |
#include "src/core/SkColorData.h" |
| 14 |
#include "src/gpu/ganesh/GrSurfaceProxyView.h" |
| 15 |
|
| 16 |
enum SkAlphaType : int; |
| 17 |
enum class GrQuadAAFlags; |
| 18 |
struct SkPoint; |
| 19 |
|
| 20 |
/** Used by SDC::drawQuadSet and FillRectOp */ |
| 21 |
struct GrQuadSetEntry { |
| 22 |
SkRect fRect; |
| 23 |
SkPMColor4f fColor; // Overrides any color on the GrPaint |
| 24 |
SkMatrix fLocalMatrix; |
| 25 |
GrQuadAAFlags fAAFlags; |
| 26 |
}; |
| 27 |
|
| 28 |
/** Used by SDC::drawTextureSet and TextureOp */ |
| 29 |
struct GrTextureSetEntry { |
| 30 |
GrSurfaceProxyView fProxyView; |
| 31 |
SkAlphaType fSrcAlphaType; |
| 32 |
SkRect fSrcRect; |
| 33 |
SkRect fDstRect; |
| 34 |
const SkPoint* fDstClipQuad; // Must be null, or point to an array of 4 points |
| 35 |
const SkMatrix* fPreViewMatrix; // If not null, entry's CTM is 'viewMatrix' * fPreViewMatrix |
| 36 |
SkPMColor4f fColor; // {a,a,a,a} for rgb textures, {r,g,b,a} for alpha-only textures |
| 37 |
GrQuadAAFlags fAAFlags; |
| 38 |
}; |
| 39 |
|
| 40 |
#endif |