summaryrefslogtreecommitdiffstats
path: root/gfx/skia/skia/src/gpu/GrPLSGeometryProcessor.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/skia/skia/src/gpu/GrPLSGeometryProcessor.h')
-rw-r--r--gfx/skia/skia/src/gpu/GrPLSGeometryProcessor.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/gfx/skia/skia/src/gpu/GrPLSGeometryProcessor.h b/gfx/skia/skia/src/gpu/GrPLSGeometryProcessor.h
new file mode 100644
index 000000000..0640af63f
--- /dev/null
+++ b/gfx/skia/skia/src/gpu/GrPLSGeometryProcessor.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrPLSGeometryProcessor_DEFINED
+#define GrPLSGeometryProcessor_DEFINED
+
+#include "GrGeometryProcessor.h"
+
+/**
+ * A minor extension to GrGeometryProcessor that adds bounds tracking for pixel local storage
+ * purposes.
+ */
+class GrPLSGeometryProcessor : public GrGeometryProcessor {
+public:
+ GrPixelLocalStorageState getPixelLocalStorageState() const override {
+ return GrPixelLocalStorageState::kDraw_GrPixelLocalStorageState;
+ }
+
+ const SkRect& getBounds() const {
+ return fBounds;
+ }
+
+ void setBounds(SkRect& bounds) {
+ fBounds = bounds;
+ }
+
+private:
+ SkRect fBounds;
+};
+
+#endif