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 #include "SkImageGenerator.h" |
| 9 |
| 10 #include "SkMatrix.h" |
| 11 #include "SkPaint.h" |
| 12 #include "SkRefCnt.h" |
| 13 #include "SkTLazy.h" |
| 14 |
| 15 class SkPicture; |
| 16 |
| 17 class SkPictureImageGenerator : SkImageGenerator { |
| 18 public: |
| 19 static SkImageGenerator* Create(const SkISize&, const SkPicture*, const SkMa
trix*, |
| 20 const SkPaint*); |
| 21 |
| 22 protected: |
| 23 bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkP
MColor ctable[], |
| 24 int* ctableCount) override; |
| 25 |
| 26 private: |
| 27 SkPictureImageGenerator(const SkISize&, const SkPicture*, const SkMatrix*, c
onst SkPaint*); |
| 28 |
| 29 SkAutoTUnref<const SkPicture> fPicture; |
| 30 SkMatrix fMatrix; |
| 31 SkTLazy<SkPaint> fPaint; |
| 32 |
| 33 typedef SkImageGenerator INHERITED; |
| 34 }; |
OLD | NEW |