robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 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 | |
Brian Osman | 1105224 | 2016-10-27 14:47:55 -0400 | [diff] [blame] | 8 | #ifndef GrRenderTargetContext_DEFINED |
| 9 | #define GrRenderTargetContext_DEFINED |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 10 | |
| 11 | #include "GrColor.h" |
bsalomon | faf8203 | 2016-09-16 09:53:27 -0700 | [diff] [blame] | 12 | #include "GrContext.h" |
csmartdalton | ecbc12b | 2016-06-08 10:08:43 -0700 | [diff] [blame] | 13 | #include "GrPaint.h" |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 14 | #include "GrSurfaceContext.h" |
Brian Salomon | 467921e | 2017-03-06 16:17:12 -0500 | [diff] [blame] | 15 | #include "GrXferProcessor.h" |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 16 | #include "SkRefCnt.h" |
robertphillips | fcf7829 | 2015-06-19 11:49:52 -0700 | [diff] [blame] | 17 | #include "SkSurfaceProps.h" |
csmartdalton | a7f2964 | 2016-07-07 08:49:11 -0700 | [diff] [blame] | 18 | #include "../private/GrInstancedPipelineInfo.h" |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 19 | #include "../private/GrRenderTargetProxy.h" |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 20 | |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 21 | class GrClip; |
robertphillips | 77a2e52 | 2015-10-17 07:43:27 -0700 | [diff] [blame] | 22 | class GrDrawingManager; |
Brian Salomon | 9afd371 | 2016-12-01 10:59:09 -0500 | [diff] [blame] | 23 | class GrDrawOp; |
csmartdalton | 29df760 | 2016-08-31 11:55:52 -0700 | [diff] [blame] | 24 | class GrFixedClip; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 25 | class GrPipelineBuilder; |
Brian Salomon | 649a341 | 2017-03-09 13:50:43 -0500 | [diff] [blame] | 26 | class GrMeshDrawOp; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 27 | class GrRenderTarget; |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 28 | class GrRenderTargetContextPriv; |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 29 | class GrRenderTargetOpList; |
bsalomon | 6663acf | 2016-05-10 09:14:17 -0700 | [diff] [blame] | 30 | class GrStyle; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 31 | class GrSurface; |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 32 | class GrTextureProxy; |
robertphillips | 4430239 | 2016-07-08 14:43:03 -0700 | [diff] [blame] | 33 | struct GrUserStencilSettings; |
robertphillips | 2334fb6 | 2015-06-17 05:43:33 -0700 | [diff] [blame] | 34 | class SkDrawFilter; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 35 | struct SkIPoint; |
| 36 | struct SkIRect; |
msarett | 10e3d9b | 2016-08-18 15:46:03 -0700 | [diff] [blame] | 37 | class SkLatticeIter; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 38 | class SkMatrix; |
robertphillips | 2334fb6 | 2015-06-17 05:43:33 -0700 | [diff] [blame] | 39 | class SkPaint; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 40 | class SkPath; |
| 41 | struct SkPoint; |
| 42 | struct SkRect; |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 43 | class SkRegion; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 44 | class SkRRect; |
jvanverth | 31ff762 | 2015-08-07 10:09:28 -0700 | [diff] [blame] | 45 | struct SkRSXform; |
robertphillips | 2334fb6 | 2015-06-17 05:43:33 -0700 | [diff] [blame] | 46 | class SkTextBlob; |
Brian Salomon | 199fb87 | 2017-02-06 09:41:10 -0500 | [diff] [blame] | 47 | class SkVertices; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 48 | |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 49 | /** |
| 50 | * A helper object to orchestrate commands (draws, etc...) for GrSurfaces that are GrRenderTargets. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 51 | */ |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 52 | class SK_API GrRenderTargetContext : public GrSurfaceContext { |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 53 | public: |
Brian Osman | 1105224 | 2016-10-27 14:47:55 -0400 | [diff] [blame] | 54 | ~GrRenderTargetContext() override; |
robertphillips | 2334fb6 | 2015-06-17 05:43:33 -0700 | [diff] [blame] | 55 | |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 56 | GrResourceProvider* resourceProvider() { return fContext->resourceProvider(); } |
| 57 | |
Brian Salomon | 6f1d36c | 2017-01-13 12:02:17 -0500 | [diff] [blame] | 58 | // We use SkPaint rather than GrPaint here for two reasons: |
| 59 | // * The SkPaint carries extra text settings. If these were extracted to a lighter object |
| 60 | // we could use GrPaint except that |
| 61 | // * SkPaint->GrPaint conversion depends upon whether the glyphs are color or grayscale and |
| 62 | // this can vary within a text run. |
| 63 | virtual void drawText(const GrClip&, const SkPaint&, const SkMatrix& viewMatrix, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 64 | const char text[], size_t byteLength, SkScalar x, SkScalar y, |
| 65 | const SkIRect& clipBounds); |
Brian Salomon | 6f1d36c | 2017-01-13 12:02:17 -0500 | [diff] [blame] | 66 | virtual void drawPosText(const GrClip&, const SkPaint&, const SkMatrix& viewMatrix, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 67 | const char text[], size_t byteLength, const SkScalar pos[], |
| 68 | int scalarsPerPosition, const SkPoint& offset, |
| 69 | const SkIRect& clipBounds); |
joshualitt | 96880d9 | 2016-02-16 10:36:53 -0800 | [diff] [blame] | 70 | virtual void drawTextBlob(const GrClip&, const SkPaint&, |
| 71 | const SkMatrix& viewMatrix, const SkTextBlob*, |
| 72 | SkScalar x, SkScalar y, |
| 73 | SkDrawFilter*, const SkIRect& clipBounds); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 74 | |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 75 | /** |
| 76 | * Provides a perfomance hint that the render target's contents are allowed |
| 77 | * to become undefined. |
| 78 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 79 | void discard(); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 80 | |
| 81 | /** |
| 82 | * Clear the entire or rect of the render target, ignoring any clips. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 83 | * @param rect the rect to clear or the whole thing if rect is NULL. |
| 84 | * @param color the color to clear to. |
| 85 | * @param canIgnoreRect allows partial clears to be converted to whole |
| 86 | * clears on platforms for which that is cheap |
| 87 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 88 | void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 89 | |
| 90 | /** |
| 91 | * Draw everywhere (respecting the clip) with the paint. |
| 92 | */ |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 93 | void drawPaint(const GrClip&, GrPaint&&, const SkMatrix& viewMatrix); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 94 | |
| 95 | /** |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 96 | * Draw the rect using a paint. |
| 97 | * @param paint describes how to color pixels. |
| 98 | * @param GrAA Controls whether rect is antialiased |
| 99 | * @param viewMatrix transformation matrix |
| 100 | * @param style The style to apply. Null means fill. Currently path effects are not |
| 101 | * allowed. |
| 102 | * The rects coords are used to access the paint (through texture matrix) |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 103 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 104 | void drawRect(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 105 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 106 | GrAA, |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 107 | const SkMatrix& viewMatrix, |
| 108 | const SkRect&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 109 | const GrStyle* style = nullptr); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 110 | |
| 111 | /** |
bsalomon | a2e69fc | 2015-11-05 10:41:43 -0800 | [diff] [blame] | 112 | * Maps a rectangle of shader coordinates to a rectangle and fills that rectangle. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 113 | * |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 114 | * @param paint describes how to color pixels. |
| 115 | * @param GrAA Controls whether rect is antialiased |
| 116 | * @param viewMatrix transformation matrix which applies to rectToDraw |
| 117 | * @param rectToDraw the rectangle to draw |
| 118 | * @param localRect the rectangle of shader coordinates applied to rectToDraw |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 119 | */ |
bsalomon | a2e69fc | 2015-11-05 10:41:43 -0800 | [diff] [blame] | 120 | void fillRectToRect(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 121 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 122 | GrAA, |
bsalomon | a2e69fc | 2015-11-05 10:41:43 -0800 | [diff] [blame] | 123 | const SkMatrix& viewMatrix, |
| 124 | const SkRect& rectToDraw, |
| 125 | const SkRect& localRect); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 126 | |
| 127 | /** |
bsalomon | a2e69fc | 2015-11-05 10:41:43 -0800 | [diff] [blame] | 128 | * Fills a rect with a paint and a localMatrix. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 129 | */ |
bsalomon | a2e69fc | 2015-11-05 10:41:43 -0800 | [diff] [blame] | 130 | void fillRectWithLocalMatrix(const GrClip& clip, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 131 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 132 | GrAA, |
bsalomon | a2e69fc | 2015-11-05 10:41:43 -0800 | [diff] [blame] | 133 | const SkMatrix& viewMatrix, |
| 134 | const SkRect& rect, |
| 135 | const SkMatrix& localMatrix); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 136 | |
| 137 | /** |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 138 | * Draw a roundrect using a paint. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 139 | * |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 140 | * @param paint describes how to color pixels. |
| 141 | * @param GrAA Controls whether rrect is antialiased. |
| 142 | * @param viewMatrix transformation matrix |
| 143 | * @param rrect the roundrect to draw |
| 144 | * @param style style to apply to the rrect. Currently path effects are not allowed. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 145 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 146 | void drawRRect(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 147 | GrPaint&&, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 148 | GrAA, |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 149 | const SkMatrix& viewMatrix, |
| 150 | const SkRRect& rrect, |
bsalomon | 6663acf | 2016-05-10 09:14:17 -0700 | [diff] [blame] | 151 | const GrStyle& style); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 152 | |
| 153 | /** |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 154 | * Draw a roundrect using a paint and a shadow shader. This is separate from drawRRect |
| 155 | * because it uses different underlying geometry and GeometryProcessor |
Jim Van Verth | c590341 | 2016-11-17 15:27:09 -0500 | [diff] [blame] | 156 | * |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 157 | * @param paint describes how to color pixels. |
| 158 | * @param viewMatrix transformation matrix |
| 159 | * @param rrect the roundrect to draw |
| 160 | * @param blurRadius amount of shadow blur to apply (in device space) |
| 161 | * @param style style to apply to the rrect. Currently path effects are not allowed. |
Jim Van Verth | c590341 | 2016-11-17 15:27:09 -0500 | [diff] [blame] | 162 | */ |
| 163 | void drawShadowRRect(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 164 | GrPaint&&, |
Jim Van Verth | c590341 | 2016-11-17 15:27:09 -0500 | [diff] [blame] | 165 | const SkMatrix& viewMatrix, |
| 166 | const SkRRect& rrect, |
| 167 | SkScalar blurRadius, |
| 168 | const GrStyle& style); |
| 169 | |
| 170 | /** |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 171 | * Shortcut for filling a SkPath consisting of nested rrects using a paint. The result is |
| 172 | * undefined if outer does not contain inner. |
robertphillips | 0009589 | 2016-02-29 13:50:40 -0800 | [diff] [blame] | 173 | * |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 174 | * @param paint describes how to color pixels. |
| 175 | * @param GrAA Controls whether rrects edges are antialiased |
| 176 | * @param viewMatrix transformation matrix |
| 177 | * @param outer the outer roundrect |
| 178 | * @param inner the inner roundrect |
robertphillips | 0009589 | 2016-02-29 13:50:40 -0800 | [diff] [blame] | 179 | */ |
| 180 | void drawDRRect(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 181 | GrPaint&&, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 182 | GrAA, |
robertphillips | 0009589 | 2016-02-29 13:50:40 -0800 | [diff] [blame] | 183 | const SkMatrix& viewMatrix, |
| 184 | const SkRRect& outer, |
| 185 | const SkRRect& inner); |
| 186 | |
| 187 | /** |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 188 | * Draws a path. |
| 189 | * |
| 190 | * @param paint describes how to color pixels. |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 191 | * @param GrAA Controls whether the path is antialiased. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 192 | * @param viewMatrix transformation matrix |
| 193 | * @param path the path to draw |
bsalomon | 6663acf | 2016-05-10 09:14:17 -0700 | [diff] [blame] | 194 | * @param style style to apply to the path. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 195 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 196 | void drawPath(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 197 | GrPaint&&, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 198 | GrAA, |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 199 | const SkMatrix& viewMatrix, |
| 200 | const SkPath&, |
bsalomon | 6663acf | 2016-05-10 09:14:17 -0700 | [diff] [blame] | 201 | const GrStyle& style); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 202 | |
Brian Salomon | 3de0aee | 2017-01-29 09:34:17 -0500 | [diff] [blame] | 203 | enum class ColorArrayType { |
| 204 | kPremulGrColor, |
| 205 | kSkColor, |
| 206 | }; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 207 | /** |
| 208 | * Draws vertices with a paint. |
| 209 | * |
| 210 | * @param paint describes how to color pixels. |
| 211 | * @param viewMatrix transformation matrix |
| 212 | * @param primitiveType primitives type to draw. |
| 213 | * @param vertexCount number of vertices. |
| 214 | * @param positions array of vertex positions, required. |
| 215 | * @param texCoords optional array of texture coordinates used |
| 216 | * to access the paint. |
| 217 | * @param colors optional array of per-vertex colors, supercedes |
| 218 | * the paint's color field. |
| 219 | * @param indices optional array of indices. If NULL vertices |
| 220 | * are drawn non-indexed. |
| 221 | * @param indexCount if indices is non-null then this is the |
| 222 | * number of indices. |
Brian Salomon | 3de0aee | 2017-01-29 09:34:17 -0500 | [diff] [blame] | 223 | * @param ColorArrayType Determines how the color array should be interpreted. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 224 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 225 | void drawVertices(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 226 | GrPaint&& paint, |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 227 | const SkMatrix& viewMatrix, |
| 228 | GrPrimitiveType primitiveType, |
| 229 | int vertexCount, |
| 230 | const SkPoint positions[], |
| 231 | const SkPoint texs[], |
Brian Salomon | 3de0aee | 2017-01-29 09:34:17 -0500 | [diff] [blame] | 232 | const uint32_t colors[], |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 233 | const uint16_t indices[], |
Brian Salomon | 3de0aee | 2017-01-29 09:34:17 -0500 | [diff] [blame] | 234 | int indexCount, |
| 235 | ColorArrayType = ColorArrayType::kPremulGrColor); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 236 | |
| 237 | /** |
Brian Salomon | 199fb87 | 2017-02-06 09:41:10 -0500 | [diff] [blame] | 238 | * Draws vertices with a paint. |
| 239 | * |
| 240 | * @param paint describes how to color pixels. |
| 241 | * @param viewMatrix transformation matrix |
| 242 | * @param veritces specifies the mesh to draw. |
| 243 | * @param flags A bitfield of options specified by SkCanvas::VerticesFlags. |
| 244 | */ |
| 245 | void drawVertices(const GrClip&, |
| 246 | GrPaint&& paint, |
| 247 | const SkMatrix& viewMatrix, |
| 248 | sk_sp<SkVertices> vertices, |
| 249 | uint32_t flags); |
| 250 | |
| 251 | /** |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 252 | * Draws textured sprites from an atlas with a paint. This currently does not support AA for the |
| 253 | * sprite rectangle edges. |
jvanverth | 31ff762 | 2015-08-07 10:09:28 -0700 | [diff] [blame] | 254 | * |
| 255 | * @param paint describes how to color pixels. |
| 256 | * @param viewMatrix transformation matrix |
| 257 | * @param spriteCount number of sprites. |
| 258 | * @param xform array of compressed transformation data, required. |
| 259 | * @param texRect array of texture rectangles used to access the paint. |
| 260 | * @param colors optional array of per-sprite colors, supercedes |
| 261 | * the paint's color field. |
| 262 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 263 | void drawAtlas(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 264 | GrPaint&& paint, |
jvanverth | 31ff762 | 2015-08-07 10:09:28 -0700 | [diff] [blame] | 265 | const SkMatrix& viewMatrix, |
| 266 | int spriteCount, |
| 267 | const SkRSXform xform[], |
| 268 | const SkRect texRect[], |
| 269 | const SkColor colors[]); |
msarett | cc319b9 | 2016-08-25 18:07:18 -0700 | [diff] [blame] | 270 | |
| 271 | /** |
| 272 | * Draws a region. |
| 273 | * |
| 274 | * @param paint describes how to color pixels |
| 275 | * @param viewMatrix transformation matrix |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 276 | * @param aa should the rects of the region be antialiased. |
msarett | cc319b9 | 2016-08-25 18:07:18 -0700 | [diff] [blame] | 277 | * @param region the region to be drawn |
| 278 | * @param style style to apply to the region |
| 279 | */ |
| 280 | void drawRegion(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 281 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 282 | GrAA aa, |
msarett | cc319b9 | 2016-08-25 18:07:18 -0700 | [diff] [blame] | 283 | const SkMatrix& viewMatrix, |
| 284 | const SkRegion& region, |
| 285 | const GrStyle& style); |
| 286 | |
jvanverth | 31ff762 | 2015-08-07 10:09:28 -0700 | [diff] [blame] | 287 | /** |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 288 | * Draws an oval. |
| 289 | * |
| 290 | * @param paint describes how to color pixels. |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 291 | * @param GrAA Controls whether the oval is antialiased. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 292 | * @param viewMatrix transformation matrix |
| 293 | * @param oval the bounding rect of the oval. |
bsalomon | 6663acf | 2016-05-10 09:14:17 -0700 | [diff] [blame] | 294 | * @param style style to apply to the oval. Currently path effects are not allowed. |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 295 | */ |
robertphillips | 2e1e51f | 2015-10-15 08:01:48 -0700 | [diff] [blame] | 296 | void drawOval(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 297 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 298 | GrAA, |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 299 | const SkMatrix& viewMatrix, |
| 300 | const SkRect& oval, |
bsalomon | 6663acf | 2016-05-10 09:14:17 -0700 | [diff] [blame] | 301 | const GrStyle& style); |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 302 | /** |
| 303 | * Draws a partial arc of an oval. |
| 304 | * |
| 305 | * @param paint describes how to color pixels. |
Brian Salomon | 9950408 | 2016-12-09 15:51:31 -0500 | [diff] [blame] | 306 | * @param GrGrAA Controls whether the arc is antialiased. |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 307 | * @param viewMatrix transformation matrix. |
| 308 | * @param oval the bounding rect of the oval. |
| 309 | * @param startAngle starting angle in degrees. |
| 310 | * @param sweepAngle angle to sweep in degrees. Must be in (-360, 360) |
| 311 | * @param useCenter true means that the implied path begins at the oval center, connects as |
| 312 | * a line to the point indicated by the start contains the arc indicated by |
| 313 | * the sweep angle. If false the line beginning at the center point is |
| 314 | * omitted. |
| 315 | * @param style style to apply to the oval. |
| 316 | */ |
bsalomon | 4f3a0ca | 2016-08-22 13:14:26 -0700 | [diff] [blame] | 317 | void drawArc(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 318 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 319 | GrAA, |
bsalomon | 4f3a0ca | 2016-08-22 13:14:26 -0700 | [diff] [blame] | 320 | const SkMatrix& viewMatrix, |
| 321 | const SkRect& oval, |
| 322 | SkScalar startAngle, |
| 323 | SkScalar sweepAngle, |
| 324 | bool useCenter, |
| 325 | const GrStyle& style); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 326 | |
joshualitt | 33a5fce | 2015-11-18 13:28:51 -0800 | [diff] [blame] | 327 | /** |
bsalomon | 4f3a0ca | 2016-08-22 13:14:26 -0700 | [diff] [blame] | 328 | * Draw the image as a set of rects, specified by |iter|. |
joshualitt | 33a5fce | 2015-11-18 13:28:51 -0800 | [diff] [blame] | 329 | */ |
msarett | 10e3d9b | 2016-08-18 15:46:03 -0700 | [diff] [blame] | 330 | void drawImageLattice(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 331 | GrPaint&& paint, |
msarett | 10e3d9b | 2016-08-18 15:46:03 -0700 | [diff] [blame] | 332 | const SkMatrix& viewMatrix, |
| 333 | int imageWidth, |
| 334 | int imageHeight, |
| 335 | std::unique_ptr<SkLatticeIter> iter, |
| 336 | const SkRect& dst); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 337 | |
robertphillips | 8c523e0 | 2016-07-26 07:41:00 -0700 | [diff] [blame] | 338 | /** |
| 339 | * After this returns any pending surface IO will be issued to the backend 3D API and |
| 340 | * if the surface has MSAA it will be resolved. |
| 341 | */ |
| 342 | void prepareForExternalIO(); |
| 343 | |
robertphillips | 976f5f0 | 2016-06-03 10:59:20 -0700 | [diff] [blame] | 344 | bool isStencilBufferMultisampled() const { |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 345 | return fRenderTargetProxy->isStencilBufferMultisampled(); |
robertphillips | 976f5f0 | 2016-06-03 10:59:20 -0700 | [diff] [blame] | 346 | } |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 347 | bool isUnifiedMultisampled() const { return fRenderTargetProxy->isUnifiedMultisampled(); } |
| 348 | bool hasMixedSamples() const { return fRenderTargetProxy->isMixedSampled(); } |
robertphillips | 82ec6e5 | 2016-05-19 14:01:05 -0700 | [diff] [blame] | 349 | |
bsalomon | faf8203 | 2016-09-16 09:53:27 -0700 | [diff] [blame] | 350 | const GrCaps* caps() const { return fContext->caps(); } |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 351 | const GrSurfaceDesc& desc() const { return fRenderTargetProxy->desc(); } |
| 352 | int width() const { return fRenderTargetProxy->width(); } |
| 353 | int height() const { return fRenderTargetProxy->height(); } |
| 354 | GrPixelConfig config() const { return fRenderTargetProxy->config(); } |
| 355 | int numColorSamples() const { return fRenderTargetProxy->numColorSamples(); } |
robertphillips | ca6eafc | 2016-05-17 09:57:46 -0700 | [diff] [blame] | 356 | const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
msarett | c71a9b7 | 2016-09-16 11:01:27 -0700 | [diff] [blame] | 357 | GrColorSpaceXform* getColorXformFromSRGB() const { return fColorXformFromSRGB.get(); } |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 358 | GrSurfaceOrigin origin() const { return fRenderTargetProxy->origin(); } |
robertphillips | 7bceedc | 2015-12-01 12:51:26 -0800 | [diff] [blame] | 359 | |
robertphillips | 7761d61 | 2016-05-16 09:14:53 -0700 | [diff] [blame] | 360 | bool wasAbandoned() const; |
| 361 | |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 362 | GrRenderTarget* instantiate(); |
| 363 | |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 364 | GrRenderTarget* accessRenderTarget() { |
| 365 | // TODO: usage of this entry point needs to be reduced and potentially eliminated |
| 366 | // since it ends the deferral of the GrRenderTarget's allocation |
Brian Osman | 32342f0 | 2017-03-04 08:12:46 -0500 | [diff] [blame] | 367 | return fRenderTargetProxy->instantiate(fContext->resourceProvider()); |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 368 | } |
robertphillips | 6c7e325 | 2016-04-27 10:47:51 -0700 | [diff] [blame] | 369 | |
Robert Phillips | f200a90 | 2017-01-30 13:27:37 -0500 | [diff] [blame] | 370 | GrSurfaceProxy* asSurfaceProxy() override { return fRenderTargetProxy.get(); } |
| 371 | const GrSurfaceProxy* asSurfaceProxy() const override { return fRenderTargetProxy.get(); } |
| 372 | sk_sp<GrSurfaceProxy> asSurfaceProxyRef() override { return fRenderTargetProxy; } |
| 373 | |
| 374 | GrTextureProxy* asTextureProxy() override; |
| 375 | sk_sp<GrTextureProxy> asTextureProxyRef() override; |
| 376 | |
| 377 | GrRenderTargetProxy* asRenderTargetProxy() override { return fRenderTargetProxy.get(); } |
| 378 | sk_sp<GrRenderTargetProxy> asRenderTargetProxyRef() override { return fRenderTargetProxy; } |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 379 | |
Robert Phillips | d46697a | 2017-01-25 12:10:37 -0500 | [diff] [blame] | 380 | GrRenderTargetContext* asRenderTargetContext() override { return this; } |
| 381 | |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 382 | sk_sp<GrTexture> asTexture() { |
Robert Phillips | e60ad62 | 2016-11-17 10:22:48 -0500 | [diff] [blame] | 383 | if (!this->accessRenderTarget()) { |
| 384 | return nullptr; |
| 385 | } |
| 386 | |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 387 | // TODO: usage of this entry point needs to be reduced and potentially eliminated |
| 388 | // since it ends the deferral of the GrRenderTarget's allocation |
Robert Phillips | f200a90 | 2017-01-30 13:27:37 -0500 | [diff] [blame] | 389 | // It's usage should migrate to asTextureProxyRef |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 390 | return sk_ref_sp(this->accessRenderTarget()->asTexture()); |
| 391 | } |
robertphillips | 433625e | 2015-12-04 06:58:16 -0800 | [diff] [blame] | 392 | |
robertphillips | 391395d | 2016-03-02 09:26:36 -0800 | [diff] [blame] | 393 | // Provides access to functions that aren't part of the public API. |
Brian Osman | 693a540 | 2016-10-27 15:13:22 -0400 | [diff] [blame] | 394 | GrRenderTargetContextPriv priv(); |
| 395 | const GrRenderTargetContextPriv priv() const; |
joshualitt | f5883a6 | 2016-01-13 07:47:38 -0800 | [diff] [blame] | 396 | |
Robert Phillips | eaa8625 | 2016-11-08 13:49:39 +0000 | [diff] [blame] | 397 | bool isWrapped_ForTesting() const; |
| 398 | |
joshualitt | 96880d9 | 2016-02-16 10:36:53 -0800 | [diff] [blame] | 399 | protected: |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 400 | GrRenderTargetContext(GrContext*, GrDrawingManager*, sk_sp<GrRenderTargetProxy>, |
Robert Phillips | 2c86249 | 2017-01-18 10:08:39 -0500 | [diff] [blame] | 401 | sk_sp<SkColorSpace>, const SkSurfaceProps*, GrAuditTrail*, |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 402 | GrSingleOwner*); |
joshualitt | 96880d9 | 2016-02-16 10:36:53 -0800 | [diff] [blame] | 403 | |
joshualitt | 96880d9 | 2016-02-16 10:36:53 -0800 | [diff] [blame] | 404 | SkDEBUGCODE(void validate() const;) |
| 405 | |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 406 | private: |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 407 | inline GrAAType decideAAType(GrAA aa, bool allowMixedSamples = false) { |
| 408 | if (GrAA::kNo == aa) { |
| 409 | return GrAAType::kNone; |
| 410 | } |
| 411 | if (this->isUnifiedMultisampled()) { |
| 412 | return GrAAType::kMSAA; |
| 413 | } |
| 414 | if (allowMixedSamples && this->isStencilBufferMultisampled()) { |
| 415 | return GrAAType::kMixedSamples; |
| 416 | } |
| 417 | return GrAAType::kCoverage; |
| 418 | } |
| 419 | |
Brian Salomon | 649a341 | 2017-03-09 13:50:43 -0500 | [diff] [blame] | 420 | friend class GrAtlasTextBlob; // for access to add[Mesh]DrawOp |
| 421 | friend class GrStencilAndCoverTextContext; // for access to add[Mesh]DrawOp |
robertphillips | 55fdccc | 2016-06-06 06:16:20 -0700 | [diff] [blame] | 422 | |
robertphillips | 77a2e52 | 2015-10-17 07:43:27 -0700 | [diff] [blame] | 423 | friend class GrDrawingManager; // for ctor |
Brian Osman | 1105224 | 2016-10-27 14:47:55 -0400 | [diff] [blame] | 424 | friend class GrRenderTargetContextPriv; |
Brian Salomon | 649a341 | 2017-03-09 13:50:43 -0500 | [diff] [blame] | 425 | friend class GrSWMaskHelper; // for access to add[Mesh]DrawOp |
robertphillips | 976f5f0 | 2016-06-03 10:59:20 -0700 | [diff] [blame] | 426 | |
Brian Salomon | 42521e8 | 2016-12-07 16:44:58 -0500 | [diff] [blame] | 427 | // All the path renderers currently make their own ops |
Brian Salomon | 649a341 | 2017-03-09 13:50:43 -0500 | [diff] [blame] | 428 | friend class GrSoftwarePathRenderer; // for access to add[Mesh]DrawOp |
| 429 | friend class GrAAConvexPathRenderer; // for access to add[Mesh]DrawOp |
| 430 | friend class GrDashLinePathRenderer; // for access to add[Mesh]DrawOp |
| 431 | friend class GrAAHairLinePathRenderer; // for access to add[Mesh]DrawOp |
| 432 | friend class GrAALinearizingConvexPathRenderer; // for access to add[Mesh]DrawOp |
| 433 | friend class GrAADistanceFieldPathRenderer; // for access to add[Mesh]DrawOp |
| 434 | friend class GrDefaultPathRenderer; // for access to add[Mesh]DrawOp |
| 435 | friend class GrMSAAPathRenderer; // for access to add[Mesh]DrawOp |
| 436 | friend class GrStencilAndCoverPathRenderer; // for access to add[Mesh]DrawOp |
| 437 | friend class GrTessellatingPathRenderer; // for access to add[Mesh]DrawOp |
Brian Salomon | 5d4cd9e | 2017-02-09 11:16:46 -0500 | [diff] [blame] | 438 | // for a unit test |
Robert Phillips | 296b1cc | 2017-03-15 10:42:12 -0400 | [diff] [blame^] | 439 | friend void test_draw_op(GrRenderTargetContext*, |
Robert Phillips | 30f9bc6 | 2017-02-22 15:28:38 -0500 | [diff] [blame] | 440 | sk_sp<GrFragmentProcessor>, sk_sp<GrTextureProxy>); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 441 | |
csmartdalton | 29df760 | 2016-08-31 11:55:52 -0700 | [diff] [blame] | 442 | void internalClear(const GrFixedClip&, const GrColor, bool canIgnoreClip); |
| 443 | |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 444 | // Only consumes the GrPaint if successful. |
robertphillips | 0009589 | 2016-02-29 13:50:40 -0800 | [diff] [blame] | 445 | bool drawFilledDRRect(const GrClip& clip, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 446 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 447 | GrAA, |
robertphillips | 0009589 | 2016-02-29 13:50:40 -0800 | [diff] [blame] | 448 | const SkMatrix& viewMatrix, |
| 449 | const SkRRect& origOuter, |
| 450 | const SkRRect& origInner); |
| 451 | |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 452 | // Only consumes the GrPaint if successful. |
robertphillips | 4430239 | 2016-07-08 14:43:03 -0700 | [diff] [blame] | 453 | bool drawFilledRect(const GrClip& clip, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 454 | GrPaint&& paint, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 455 | GrAA, |
robertphillips | 4430239 | 2016-07-08 14:43:03 -0700 | [diff] [blame] | 456 | const SkMatrix& viewMatrix, |
| 457 | const SkRect& rect, |
| 458 | const GrUserStencilSettings* ss); |
| 459 | |
| 460 | void drawNonAAFilledRect(const GrClip&, |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 461 | GrPaint&&, |
robertphillips | 4430239 | 2016-07-08 14:43:03 -0700 | [diff] [blame] | 462 | const SkMatrix& viewMatrix, |
| 463 | const SkRect& rect, |
| 464 | const SkRect* localRect, |
| 465 | const SkMatrix* localMatrix, |
csmartdalton | 34ee0c9 | 2016-07-27 13:22:27 -0700 | [diff] [blame] | 466 | const GrUserStencilSettings* ss, |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 467 | GrAAType hwOrNoneAAType); |
robertphillips | 391395d | 2016-03-02 09:26:36 -0800 | [diff] [blame] | 468 | |
Brian Salomon | 82f4431 | 2017-01-11 13:42:54 -0500 | [diff] [blame] | 469 | void internalDrawPath( |
| 470 | const GrClip&, GrPaint&&, GrAA, const SkMatrix&, const SkPath&, const GrStyle&); |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 471 | |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 472 | bool onCopy(GrSurfaceProxy* src, const SkIRect& srcRect, const SkIPoint& dstPoint) override; |
Robert Phillips | 2c86249 | 2017-01-18 10:08:39 -0500 | [diff] [blame] | 473 | bool onReadPixels(const SkImageInfo& dstInfo, void* dstBuffer, |
Robert Phillips | b726d58 | 2017-03-09 16:36:32 -0500 | [diff] [blame] | 474 | size_t dstRowBytes, int x, int y, uint32_t flags) override; |
Robert Phillips | 2c86249 | 2017-01-18 10:08:39 -0500 | [diff] [blame] | 475 | bool onWritePixels(const SkImageInfo& srcInfo, const void* srcBuffer, |
Robert Phillips | 30f9bc6 | 2017-02-22 15:28:38 -0500 | [diff] [blame] | 476 | size_t srcRowBytes, int x, int y, uint32_t flags) override; |
Robert Phillips | e2f7d18 | 2016-12-15 09:23:05 -0500 | [diff] [blame] | 477 | |
Brian Salomon | 649a341 | 2017-03-09 13:50:43 -0500 | [diff] [blame] | 478 | // These perform processing specific to Gr[Mesh]DrawOp-derived ops before recording them into |
| 479 | // the op list. They return the id of the opList to which the op was added, or 0, if it was |
Robert Phillips | c013892 | 2017-03-08 11:50:55 -0500 | [diff] [blame] | 480 | // dropped (e.g., due to clipping). |
| 481 | uint32_t addDrawOp(const GrPipelineBuilder&, const GrClip&, std::unique_ptr<GrDrawOp>); |
Brian Salomon | 649a341 | 2017-03-09 13:50:43 -0500 | [diff] [blame] | 482 | uint32_t addMeshDrawOp(const GrPipelineBuilder&, const GrClip&, |
| 483 | std::unique_ptr<GrMeshDrawOp> op); |
robertphillips | 2334fb6 | 2015-06-17 05:43:33 -0700 | [diff] [blame] | 484 | |
Brian Salomon | 467921e | 2017-03-06 16:17:12 -0500 | [diff] [blame] | 485 | // Makes a copy of the dst if it is necessary for the draw and returns the texture that should |
| 486 | // be used by GrXferProcessor to access the destination color. If the texture is nullptr then |
| 487 | // a texture copy could not be made. |
| 488 | void setupDstTexture(GrRenderTarget*, const GrClip&, const SkRect& opBounds, |
| 489 | GrXferProcessor::DstTexture*); |
| 490 | |
| 491 | |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 492 | GrRenderTargetOpList* getOpList(); |
robertphillips | a106c62 | 2015-10-16 09:07:06 -0700 | [diff] [blame] | 493 | |
Robert Phillips | c7635fa | 2016-10-28 13:25:24 -0400 | [diff] [blame] | 494 | sk_sp<GrRenderTargetProxy> fRenderTargetProxy; |
robertphillips | a106c62 | 2015-10-16 09:07:06 -0700 | [diff] [blame] | 495 | |
Brian Osman | 1105224 | 2016-10-27 14:47:55 -0400 | [diff] [blame] | 496 | // In MDB-mode the GrOpList can be closed by some other renderTargetContext that has picked |
Robert Phillips | f2361d2 | 2016-10-25 14:20:06 -0400 | [diff] [blame] | 497 | // it up. For this reason, the GrOpList should only ever be accessed via 'getOpList'. |
| 498 | GrRenderTargetOpList* fOpList; |
msarett | c71a9b7 | 2016-09-16 11:01:27 -0700 | [diff] [blame] | 499 | GrInstancedPipelineInfo fInstancedPipelineInfo; |
robertphillips | 2334fb6 | 2015-06-17 05:43:33 -0700 | [diff] [blame] | 500 | |
msarett | c71a9b7 | 2016-09-16 11:01:27 -0700 | [diff] [blame] | 501 | sk_sp<GrColorSpaceXform> fColorXformFromSRGB; |
| 502 | SkSurfaceProps fSurfaceProps; |
Robert Phillips | e305cc1f | 2016-12-14 12:19:05 -0500 | [diff] [blame] | 503 | |
| 504 | typedef GrSurfaceContext INHERITED; |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 505 | }; |
| 506 | |
| 507 | #endif |