1603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
2603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com/*
3603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com * Copyright 2012 Google Inc.
4603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com *
5603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com * Use of this source code is governed by a BSD-style license that can be
6603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com * found in the LICENSE file.
7603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com */
8603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
9603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com#ifndef GrShaderObj_DEFINED
10603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com#define GrShaderObj_DEFINED
11603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
12603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com#include "GrFakeRefObj.h"
13c02ff5cdec8e9b821d6c85fe38c5142e355a3ee6bsalomon@google.com#include "../GrGLDefines.h"
14603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
15603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com////////////////////////////////////////////////////////////////////////////////
16603687589970f5984b4c2fd42e76f443215137barobertphillips@google.comclass GrShaderObj : public GrFakeRefObj {
17603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com    GR_DEFINE_CREATOR(GrShaderObj);
18603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
19603687589970f5984b4c2fd42e76f443215137barobertphillips@google.compublic:
20935e9f4fafdfc64130e6be9ea2bb30e3bafd852armistry@google.com    GrShaderObj()
21603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com        : GrFakeRefObj()
228a1ae1a094fb951cac2e59156e2662816278c2a5robertphillips@google.com        , fType(GR_GL_VERTEX_SHADER)    {}
23603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
248a1ae1a094fb951cac2e59156e2662816278c2a5robertphillips@google.com    void setType(GrGLenum type)         { fType = type; }
258a1ae1a094fb951cac2e59156e2662816278c2a5robertphillips@google.com    GrGLenum getType()                  { return fType; }
26603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
278a1ae1a094fb951cac2e59156e2662816278c2a5robertphillips@google.com    virtual void deleteAction() SK_OVERRIDE;
28603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
29603687589970f5984b4c2fd42e76f443215137barobertphillips@google.comprotected:
30603687589970f5984b4c2fd42e76f443215137barobertphillips@google.comprivate:
31603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com    GrGLenum fType;  // either GR_GL_VERTEX_SHADER or GR_GL_FRAGMENT_SHADER
32603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
33603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com    typedef GrFakeRefObj INHERITED;
34603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com};
35603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com
36603687589970f5984b4c2fd42e76f443215137barobertphillips@google.com#endif // GrShaderObj_DEFINED
37