gfx/skia/trunk/src/gpu/gl/GrGLPath.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/gpu/gl/GrGLPath.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2012 Google Inc.
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +#ifndef GrGLPath_DEFINED
    1.13 +#define GrGLPath_DEFINED
    1.14 +
    1.15 +#include "../GrPath.h"
    1.16 +#include "gl/GrGLFunctions.h"
    1.17 +
    1.18 +class GrGpuGL;
    1.19 +
    1.20 +/**
    1.21 + * Currently this represents a path built using GL_NV_path_rendering. If we
    1.22 + * support other GL path extensions then this would have to have a type enum
    1.23 + * and/or be subclassed.
    1.24 + */
    1.25 +
    1.26 +class GrGLPath : public GrPath {
    1.27 +public:
    1.28 +    GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke);
    1.29 +    virtual ~GrGLPath();
    1.30 +    GrGLuint pathID() const { return fPathID; }
    1.31 +    // TODO: Figure out how to get an approximate size of the path in Gpu
    1.32 +    // memory.
    1.33 +    virtual size_t sizeInBytes() const SK_OVERRIDE { return 100; }
    1.34 +
    1.35 +protected:
    1.36 +    virtual void onRelease() SK_OVERRIDE;
    1.37 +    virtual void onAbandon() SK_OVERRIDE;
    1.38 +
    1.39 +private:
    1.40 +    GrGLuint fPathID;
    1.41 +
    1.42 +    typedef GrPath INHERITED;
    1.43 +};
    1.44 +
    1.45 +#endif

mercurial