GrRenderTarget.h revision e98ade4fdee03a234f68669bea84d07db4a8527e
1aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com/*
2aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    Copyright 2011 Google Inc.
3aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
4aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    Licensed under the Apache License, Version 2.0 (the "License");
5aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    you may not use this file except in compliance with the License.
6aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    You may obtain a copy of the License at
7aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
8aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com         http://www.apache.org/licenses/LICENSE-2.0
9aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
10aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    Unless required by applicable law or agreed to in writing, software
11aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    distributed under the License is distributed on an "AS IS" BASIS,
12aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    See the License for the specific language governing permissions and
14aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    limitations under the License.
15aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com */
16aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
17aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
18aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com#ifndef GrRenderTarget_DEFINED
19aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com#define GrRenderTarget_DEFINED
20aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
21aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com#include "GrRect.h"
22aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com#include "GrResource.h"
23aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
2481c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.comclass GrStencilBuffer;
25aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.comclass GrTexture;
26aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
27aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com/**
28aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com * GrRenderTarget represents a 2D buffer of pixels that can be rendered to.
29aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com * A context's render target is set by setRenderTarget(). Render targets are
30aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com * created by a createTexture with the kRenderTarget_TextureFlag flag.
31aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com * Additionally, GrContext provides methods for creating GrRenderTargets
32aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com * that wrap externally created render targets.
33aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com */
34aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.comclass GrRenderTarget : public GrResource {
35aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.compublic:
36558a75bcb323c03dd7482555c7214062a363276fbsalomon@google.com
37aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
38aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return the width of the rendertarget
39aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
40e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com    int width() const { return fDesc.fWidth; }
41aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
42aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return the height of the rendertarget
43aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
44e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com    int height() const { return fDesc.fHeight; }
45aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
46aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
47aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return the pixel config. Can be kUnknown_GrPixelConfig
48aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * if client asked us to render to a target that has a pixel
49aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * config that isn't equivalent with one of our configs.
50aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
51e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com    GrPixelConfig config() const { return fDesc.fConfig; }
52aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
53aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
54aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return the texture associated with the rendertarget, may be NULL.
55aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
56aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    GrTexture* asTexture() {return fTexture;}
57aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
58aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
59aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * If this RT is multisampled, this is the multisample buffer
60aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return the 3D API's handle to this object (e.g. FBO ID in OpenGL)
61aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
62aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    virtual intptr_t getRenderTargetHandle() const = 0;
63aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
64aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
65aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * If this RT is multisampled, this is the buffer it is resolved to.
66aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * Otherwise, same as getRenderTargetHandle().
67aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * (In GL a separate FBO ID is used for the msaa and resolved buffers)
68aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return the 3D API's handle to this object (e.g. FBO ID in OpenGL)
69aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
70aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    virtual intptr_t getRenderTargetResolvedHandle() const = 0;
71aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
72aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
73aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return true if the render target is multisampled, false otherwise
74aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
75e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com    bool isMultisampled() const { return 0 != fDesc.fSampleCnt; }
765bfc21761e0ce41206acac4c5008fc0f24debd44bsalomon@google.com
775bfc21761e0ce41206acac4c5008fc0f24debd44bsalomon@google.com    /**
785bfc21761e0ce41206acac4c5008fc0f24debd44bsalomon@google.com     * @return the number of samples-per-pixel or zero if non-MSAA.
795bfc21761e0ce41206acac4c5008fc0f24debd44bsalomon@google.com     */
80e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com    int numSamples() const { return fDesc.fSampleCnt; }
81aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
82aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
83aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * Call to indicate the multisample contents were modified such that the
84aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * render target needs to be resolved before it can be used as texture. Gr
85aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * tracks this for its own drawing and thus this only needs to be called
86aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * when the render target has been modified outside of Gr. Only meaningful
87aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * for Gr-created RT/Textures and Platform RT/Textures created with the
88aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * kGrCanResolve flag.
89aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @param rect  a rect bounding the area needing resolve. NULL indicates
90aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     *              the whole RT needs resolving.
91aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
92aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    void flagAsNeedingResolve(const GrIRect* rect = NULL);
93aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
94aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
95aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * Call to override the region that needs to be resolved.
96aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
97aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    void overrideResolveRect(const GrIRect rect);
98aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
99aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
100aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * Call to indicate that GrRenderTarget was externally resolved. This may
101aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * allow Gr to skip a redundant resolve step.
102aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
103aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    void flagAsResolved() { fResolveRect.setLargestInverted(); }
104aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
105aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
106aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return true if the GrRenderTarget requires MSAA resolving
107aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
108aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    bool needsResolve() const { return !fResolveRect.isEmpty(); }
109aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
110aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
111aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * Returns a rect bounding the region needing resolving.
112aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
113aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    const GrIRect& getResolveRect() const { return fResolveRect; }
114aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
11575f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com    /**
11675f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com     * If the render target is multisampled this will perform a multisample
11775f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com     * resolve. Any pending draws to the target are first flushed. This only
11875f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com     * applies to render targets that are associated with GrTextures. After the
11975f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com     * function returns the GrTexture will contain the resolved pixels.
12075f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com     */
12175f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com    void resolve();
12275f9f25d8bf2adc0494f9afbbd5965809ee13acabsalomon@google.com
123aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // GrResource overrides
124aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    virtual size_t sizeInBytes() const;
125aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
126aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    /**
127aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * Reads a rectangle of pixels from the render target.
128aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @param left          left edge of the rectangle to read (inclusive)
129aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @param top           top edge of the rectangle to read (inclusive)
130aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @param width         width of rectangle to read in pixels.
131aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @param height        height of rectangle to read in pixels.
132aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @param config        the pixel config of the destination buffer
133aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @param buffer        memory to read the rectangle into.
1346f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param rowBytes      number of bytes bewtween consecutive rows. Zero
1356f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     *                      means rows are tightly packed.
136aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     *
137aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     * @return true if the read succeeded, false if not. The read can fail
1386f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     *              because of an unsupported pixel config.
139aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com     */
140aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    bool readPixels(int left, int top, int width, int height,
1416f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com                    GrPixelConfig config, void* buffer, size_t rowBytes);
1426f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com
1436f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com    /**
1446f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * Copy the src pixels [buffer, rowbytes, pixelconfig] into the render
1456f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * target at the specified rectangle.
1466f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param left          left edge of the rectangle to write (inclusive)
1476f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param top           top edge of the rectangle to write (inclusive)
1486f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param width         width of rectangle to write in pixels.
1496f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param height        height of rectangle to write in pixels.
1506f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param config        the pixel config of the source buffer
1516f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param buffer        memory to read the rectangle from.
1526f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     * @param rowBytes      number of bytes bewtween consecutive rows. Zero
1536f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     *                      means rows are tightly packed.
1546f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com     */
1556f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com    void writePixels(int left, int top, int width, int height,
1566f3795105b2b458079e53a721c1735c9518f6bb5bsalomon@google.com                     GrPixelConfig config, const void* buffer, size_t rowBytes);
157aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
158aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // a MSAA RT may require explicit resolving , it may auto-resolve (e.g. FBO
159aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // 0 in GL), or be unresolvable because the client didn't give us the
160aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // resolve destination.
161aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    enum ResolveType {
162aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com        kCanResolve_ResolveType,
163aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com        kAutoResolves_ResolveType,
164aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com        kCantResolve_ResolveType,
165aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    };
166aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    virtual ResolveType getResolveType() const = 0;
167aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
16881c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.com    /**
16981c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.com     * GrStencilBuffer is not part of the public API.
17081c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.com     */
17181c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.com    GrStencilBuffer* getStencilBuffer() const { return fStencilBuffer; }
17281c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.com    void setStencilBuffer(GrStencilBuffer* stencilBuffer);
17381c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.com
174aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.comprotected:
175aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    GrRenderTarget(GrGpu* gpu,
176aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com                   GrTexture* texture,
177aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com                   int width,
178aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com                   int height,
179aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com                   GrPixelConfig config,
1805bfc21761e0ce41206acac4c5008fc0f24debd44bsalomon@google.com                   int sampleCnt)
181aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com        : INHERITED(gpu)
18281c3f8de1cbb93a8b99d730a75ab16d864612e95bsalomon@google.com        , fStencilBuffer(NULL)
183e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com        , fTexture(texture) {
184aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com        fResolveRect.setLargestInverted();
185e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com
186e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com        fDesc.fWidth = width;
187e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com        fDesc.fHeight = height;
188e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com        fDesc.fConfig = config;
189e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com        fDesc.fSampleCnt = sampleCnt;
190aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    }
191aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
192aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    friend class GrTexture;
193aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // When a texture unrefs an owned rendertarget this func
194aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // removes the back pointer. This could be done called from
195aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // texture's destructor but would have to be done in derived
196aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // class. By the time of texture base destructor it has already
197aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    // lost its pointer to the rt.
198aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    void onTextureReleaseRenderTarget() {
199aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com        GrAssert(NULL != fTexture);
200aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com        fTexture = NULL;
201aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    }
202aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
203aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.comprivate:
204558a75bcb323c03dd7482555c7214062a363276fbsalomon@google.com    GrStencilBuffer*  fStencilBuffer;
205558a75bcb323c03dd7482555c7214062a363276fbsalomon@google.com    GrTexture*        fTexture; // not ref'ed
206e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com
207e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com    GrTextureDesc     fDesc;
208e98ade4fdee03a234f68669bea84d07db4a8527erobertphillips@google.com
209558a75bcb323c03dd7482555c7214062a363276fbsalomon@google.com    GrIRect           fResolveRect;
210aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
211aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com    typedef GrResource INHERITED;
212aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com};
213aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com
214aa5b6730f2658618015ed56ffb5882f15b6f053fbsalomon@google.com#endif
215