aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-11 13:29:29 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-11 13:29:29 +0000
commit047696c1c67b2e0a73f2b951ce23ff5b155111bb (patch)
treedbed322bec2161e4f998e2b89a308eb7f08dc3ba /include/gpu
parent7fa18762e0ab64c3473df3aab0c2bfd6fabd8831 (diff)
Move GrTextureAccess decl/defn to separate files
Review URL: https://codereview.appspot.com/6500104/ git-svn-id: http://skia.googlecode.com/svn/trunk@5482 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrCustomStage.h21
-rw-r--r--include/gpu/GrTextureAccess.h36
2 files changed, 37 insertions, 20 deletions
diff --git a/include/gpu/GrCustomStage.h b/include/gpu/GrCustomStage.h
index fd5d7e00dc..32d40b47d7 100644
--- a/include/gpu/GrCustomStage.h
+++ b/include/gpu/GrCustomStage.h
@@ -12,31 +12,12 @@
#include "GrNoncopyable.h"
#include "GrProgramStageFactory.h"
#include "GrCustomStageUnitTest.h"
+#include "GrTextureAccess.h"
class GrContext;
class GrTexture;
class SkString;
-/** A class representing the swizzle access pattern for a texture.
- */
-class GrTextureAccess {
-public:
- typedef char Swizzle[4];
-
- GrTextureAccess(const GrTexture* texture, const SkString& swizzle);
-
- const GrTexture* getTexture() const { return fTexture; }
- const Swizzle& getSwizzle() const { return fSwizzle; }
-
- bool referencesAlpha() const {
- return fSwizzle[0] == 'a' || fSwizzle[1] == 'a' || fSwizzle[2] == 'a' || fSwizzle[3] == 'a';
- }
-
-private:
- const GrTexture* fTexture;
- Swizzle fSwizzle;
-};
-
/** Provides custom vertex shader, fragment shader, uniform data for a
particular stage of the Ganesh shading pipeline.
Subclasses must have a function that produces a human-readable name:
diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h
new file mode 100644
index 0000000000..55c0a02b87
--- /dev/null
+++ b/include/gpu/GrTextureAccess.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrTextureAccess_DEFINED
+#define GrTextureAccess_DEFINED
+
+#include "GrTypes.h"
+
+class GrTexture;
+class SkString;
+
+/** A class representing the swizzle access pattern for a texture.
+ */
+class GrTextureAccess {
+public:
+ typedef char Swizzle[4];
+
+ GrTextureAccess(const GrTexture* texture, const SkString& swizzle);
+
+ const GrTexture* getTexture() const { return fTexture; }
+ const Swizzle& getSwizzle() const { return fSwizzle; }
+
+ bool referencesAlpha() const {
+ return fSwizzle[0] == 'a' || fSwizzle[1] == 'a' || fSwizzle[2] == 'a' || fSwizzle[3] == 'a';
+ }
+
+private:
+ const GrTexture* fTexture;
+ Swizzle fSwizzle;
+};
+
+#endif