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 GrRenderTarget; |
| 16 class GrStrokeInfo; |
| 17 class SkMatrix; |
| 18 class SkPaint; |
| 19 struct SkRect; |
| 20 |
| 21 class GrDrawRect : public GrDraw { |
| 22 public: |
| 23 GrDrawRect(GrRenderTarget* rt, |
| 24 GrContext* context, |
| 25 const GrClip& clip, |
| 26 const SkPaint& paint, |
| 27 const SkMatrix& viewMatrix, |
| 28 const SkRect& rect, |
| 29 const GrStrokeInfo* strokeInfo) |
| 30 : fRenderTarget(rt) |
| 31 , fContext(context) |
| 32 , fClip(&clip) |
| 33 , fPaint(&paint) |
| 34 , fViewMatrix(&viewMatrix) |
| 35 , fRect(&rect) |
| 36 , fStrokeInfo(strokeInfo) { |
| 37 GRDRAW_ASSERT_OWNED_RESOURCE(fRenderTarget); |
| 38 fClassID = GrDraw::ClassID<GrDrawRect>(); |
| 39 } |
| 40 |
| 41 void execute(GrDrawTarget*) const override; |
| 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 |