| Index: src/gpu/GrRODrawState.h
|
| diff --git a/src/gpu/GrRODrawState.h b/src/gpu/GrRODrawState.h
|
| index 19bbfc160dee52cf0bdb2a30c29f9bc4720be4e5..bba50c5522ff7fc805b74b7e0dbbbd9e93d7c452 100644
|
| --- a/src/gpu/GrRODrawState.h
|
| +++ b/src/gpu/GrRODrawState.h
|
| @@ -8,13 +8,13 @@
|
| #ifndef GrRODrawState_DEFINED
|
| #define GrRODrawState_DEFINED
|
|
|
| -#include "GrStencil.h"
|
| #include "GrEffectStage.h"
|
| +#include "GrRenderTarget.h"
|
| +#include "GrStencil.h"
|
| #include "SkMatrix.h"
|
|
|
| class GrDrawTargetCaps;
|
| class GrPaint;
|
| -class GrRenderTarget;
|
| class GrTexture;
|
|
|
| /**
|
| @@ -243,7 +243,9 @@ public:
|
| *
|
| * @return The currently set render target.
|
| */
|
| - GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); }
|
| + GrRenderTarget* getRenderTarget() const {
|
| + return static_cast<GrRenderTarget*>(fRenderTarget.getResource());
|
| + }
|
|
|
| /// @}
|
|
|
| @@ -345,10 +347,23 @@ public:
|
| };
|
|
|
| protected:
|
| + /**
|
| + * Converts refs on GrGpuResources owned directly or indirectly by this GrRODrawState into
|
| + * pending reads and writes. This should be called when a GrDrawState is recorded into
|
| + * a GrDrawTarget for later execution. Subclasses of GrRODrawState may add setters. However,
|
| + * once this call has been made the GrRODrawState is immutable. It is also no longer copyable.
|
| + * In the future this conversion will automatically happen when converting a GrDrawState into
|
| + * an optimized draw state.
|
| + */
|
| + void convertToPendingExec();
|
| +
|
| + friend class GrDrawTarget;
|
| +
|
| +protected:
|
| bool isEqual(const GrRODrawState& that) const;
|
|
|
| // These fields are roughly sorted by decreasing likelihood of being different in op==
|
| - SkAutoTUnref<GrRenderTarget> fRenderTarget;
|
| + GrProgramResource fRenderTarget;
|
| GrColor fColor;
|
| SkMatrix fViewMatrix;
|
| GrColor fBlendConstant;
|
|
|