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