ethannicholas | 2279325 | 2016-01-30 09:59:10 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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 GrPLSGeometryProcessor_DEFINED |
| 9 | #define GrPLSGeometryProcessor_DEFINED |
| 10 | |
| 11 | #include "GrGeometryProcessor.h" |
| 12 | |
| 13 | /** |
| 14 | * A minor extension to GrGeometryProcessor that adds bounds tracking for pixel local storage |
| 15 | * purposes. |
| 16 | */ |
| 17 | class GrPLSGeometryProcessor : public GrGeometryProcessor { |
| 18 | public: |
halcanary | 9d524f2 | 2016-03-29 09:03:52 -0700 | [diff] [blame] | 19 | GrPixelLocalStorageState getPixelLocalStorageState() const override { |
ethannicholas | 2279325 | 2016-01-30 09:59:10 -0800 | [diff] [blame] | 20 | return GrPixelLocalStorageState::kDraw_GrPixelLocalStorageState; |
| 21 | } |
| 22 | |
| 23 | const SkRect& getBounds() const { |
| 24 | return fBounds; |
| 25 | } |
| 26 | |
| 27 | void setBounds(SkRect& bounds) { |
| 28 | fBounds = bounds; |
| 29 | } |
| 30 | |
| 31 | private: |
| 32 | SkRect fBounds; |
| 33 | }; |
| 34 | |
| 35 | #endif |