OLD | NEW |
(Empty) | |
| 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 |
| 8 #ifndef GrDrawRect_DEFINED |
| 9 #define GrDrawRect_DEFINED |
| 10 |
| 11 #include "GrDraw.h" |
| 12 |
| 13 class GrClip; |
| 14 class GrContext; |
| 15 class GrDrawContext; |
| 16 class GrRenderTarget; |
| 17 class GrStrokeInfo; |
| 18 class SkMatrix; |
| 19 class SkPaint; |
| 20 struct SkRect; |
| 21 |
| 22 class GrDrawRect : public GrDraw { |
| 23 public: |
| 24 GrDrawRect(GrRenderTarget* rt, |
| 25 GrContext* context, |
| 26 const GrClip& clip, |
| 27 const SkPaint& paint, |
| 28 const SkMatrix& viewMatrix, |
| 29 const SkRect& rect, |
| 30 const GrStrokeInfo* strokeInfo) |
| 31 : fRenderTarget(rt) |
| 32 , fContext(context) |
| 33 , fClip(&clip) |
| 34 , fPaint(&paint) |
| 35 , fViewMatrix(&viewMatrix) |
| 36 , fRect(&rect) |
| 37 , fStrokeInfo(strokeInfo) { |
| 38 GRDRAW_ASSERT_OWNED_RESOURCE(fRenderTarget); |
| 39 } |
| 40 |
| 41 void execute(GrDrawContext*) const; |
| 42 |
| 43 static uint32_t ClassID() { return GrDraw::ClassID<GrDrawRect>(); } |
| 44 |
| 45 private: |
| 46 GrRenderTarget* fRenderTarget; |
| 47 GrContext* fContext; |
| 48 const GrClip* fClip; |
| 49 const SkPaint* fPaint; |
| 50 const SkMatrix* fViewMatrix; |
| 51 const SkRect* fRect; |
| 52 const GrStrokeInfo* fStrokeInfo; |
| 53 |
| 54 typedef GrDraw INHERITED; |
| 55 }; |
| 56 |
| 57 |
| 58 #endif |
OLD | NEW |