| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrInOrderDrawBuffer_DEFINED | 8 #ifndef GrInOrderDrawBuffer_DEFINED |
| 9 #define GrInOrderDrawBuffer_DEFINED | 9 #define GrInOrderDrawBuffer_DEFINED |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // tracking for draws | 66 // tracking for draws |
| 67 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); } | 67 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); } |
| 68 | 68 |
| 69 // overrides from GrDrawTarget | 69 // overrides from GrDrawTarget |
| 70 virtual bool geometryHints(int* vertexCount, | 70 virtual bool geometryHints(int* vertexCount, |
| 71 int* indexCount) const SK_OVERRIDE; | 71 int* indexCount) const SK_OVERRIDE; |
| 72 virtual void clear(const SkIRect* rect, | 72 virtual void clear(const SkIRect* rect, |
| 73 GrColor color, | 73 GrColor color, |
| 74 bool canIgnoreRect, | 74 bool canIgnoreRect, |
| 75 GrRenderTarget* renderTarget = NULL) SK_OVERRIDE; | 75 GrRenderTarget* renderTarget) SK_OVERRIDE; |
| 76 |
| 77 virtual void discard(GrRenderTarget*) SK_OVERRIDE; |
| 76 | 78 |
| 77 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des
c) SK_OVERRIDE; | 79 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des
c) SK_OVERRIDE; |
| 78 | 80 |
| 79 protected: | 81 protected: |
| 80 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE; | 82 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE; |
| 81 | 83 |
| 82 private: | 84 private: |
| 83 enum Cmd { | 85 enum Cmd { |
| 84 kDraw_Cmd = 1, | 86 kDraw_Cmd = 1, |
| 85 kStencilPath_Cmd = 2, | 87 kStencilPath_Cmd = 2, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 ~DrawPaths(); | 120 ~DrawPaths(); |
| 119 | 121 |
| 120 size_t fPathCount; | 122 size_t fPathCount; |
| 121 const GrPath** fPaths; | 123 const GrPath** fPaths; |
| 122 SkMatrix* fTransforms; | 124 SkMatrix* fTransforms; |
| 123 SkPath::FillType fFill; | 125 SkPath::FillType fFill; |
| 124 SkStrokeRec::Style fStroke; | 126 SkStrokeRec::Style fStroke; |
| 125 GrDeviceCoordTexture fDstCopy; | 127 GrDeviceCoordTexture fDstCopy; |
| 126 }; | 128 }; |
| 127 | 129 |
| 130 // This is also used to record a discard by setting the color to GrColor_ILL
EGAL |
| 128 struct Clear : public ::SkNoncopyable { | 131 struct Clear : public ::SkNoncopyable { |
| 129 Clear() : fRenderTarget(NULL) {} | 132 Clear() : fRenderTarget(NULL) {} |
| 130 ~Clear() { SkSafeUnref(fRenderTarget); } | 133 ~Clear() { SkSafeUnref(fRenderTarget); } |
| 131 | 134 |
| 132 SkIRect fRect; | 135 SkIRect fRect; |
| 133 GrColor fColor; | 136 GrColor fColor; |
| 134 bool fCanIgnoreRect; | 137 bool fCanIgnoreRect; |
| 135 GrRenderTarget* fRenderTarget; | 138 GrRenderTarget* fRenderTarget; |
| 136 }; | 139 }; |
| 137 | 140 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 268 |
| 266 void addToCmdBuffer(uint8_t cmd); | 269 void addToCmdBuffer(uint8_t cmd); |
| 267 | 270 |
| 268 bool fFlushing; | 271 bool fFlushing; |
| 269 uint32_t fDrawID; | 272 uint32_t fDrawID; |
| 270 | 273 |
| 271 typedef GrDrawTarget INHERITED; | 274 typedef GrDrawTarget INHERITED; |
| 272 }; | 275 }; |
| 273 | 276 |
| 274 #endif | 277 #endif |
| OLD | NEW |