<commit_before>/*
 * 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 GrSWMaskHelper_DEFINED
#define GrSWMaskHelper_DEFINED

#include "GrColor.h"
#include "GrMatrix.h"
#include "GrNoncopyable.h"
#include "SkBitmap.h"
#include "SkDraw.h"
#include "SkRasterClip.h"
#include "SkRegion.h"

class GrAutoScratchTexture;
class GrContext;
class GrTexture;
class SkPath;

/**
 * The GrSWMaskHelper helps generate clip masks using the software rendering
 * path.
 */
class GrSWMaskHelper : public GrNoncopyable {
public:
    GrSWMaskHelper(GrContext* context) 
    : fContext(context) {
    }

    void draw(const GrRect& clientRect, SkRegion::Op op, 
              bool antiAlias, GrColor color);

    void draw(const SkPath& clientPath, SkRegion::Op op, 
              GrPathFill fill, bool antiAlias, GrColor color);

    bool init(const GrIRect& pathDevBounds, 
              const GrPoint* translate,
              bool useMatrix);

    bool getTexture(GrAutoScratchTexture* tex);

    void toTexture(GrTexture* texture, bool clearToWhite);

    void clear(GrColor color) {
        fBM.eraseColor(color);
    }

protected:
private:
    GrContext*      fContext;
    GrMatrix        fMatrix;
    SkBitmap        fBM;
    SkDraw          fDraw;
    SkRasterClip    fRasterClip;

    typedef GrNoncopyable INHERITED;
};

#endif GrSWMaskHelper_DEFINED<commit_msg>fixed another clang++ compiler error<commit_after>/*
 * 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 GrSWMaskHelper_DEFINED
#define GrSWMaskHelper_DEFINED

#include "GrColor.h"
#include "GrMatrix.h"
#include "GrNoncopyable.h"
#include "SkBitmap.h"
#include "SkDraw.h"
#include "SkRasterClip.h"
#include "SkRegion.h"

class GrAutoScratchTexture;
class GrContext;
class GrTexture;
class SkPath;

/**
 * The GrSWMaskHelper helps generate clip masks using the software rendering
 * path.
 */
class GrSWMaskHelper : public GrNoncopyable {
public:
    GrSWMaskHelper(GrContext* context) 
    : fContext(context) {
    }

    void draw(const GrRect& clientRect, SkRegion::Op op, 
              bool antiAlias, GrColor color);

    void draw(const SkPath& clientPath, SkRegion::Op op, 
              GrPathFill fill, bool antiAlias, GrColor color);

    bool init(const GrIRect& pathDevBounds, 
              const GrPoint* translate,
              bool useMatrix);

    bool getTexture(GrAutoScratchTexture* tex);

    void toTexture(GrTexture* texture, bool clearToWhite);

    void clear(GrColor color) {
        fBM.eraseColor(color);
    }

protected:
private:
    GrContext*      fContext;
    GrMatrix        fMatrix;
    SkBitmap        fBM;
    SkDraw          fDraw;
    SkRasterClip    fRasterClip;

    typedef GrNoncopyable INHERITED;
};

#endif // GrSWMaskHelper_DEFINED
{'fraction_non_alphanumeric': 0.08464163822525597, 'fraction_numerical': 0.0027303754266211604, 'mean_word_length': 3.1991404011461317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4406710', 'n_tokens_mistral': 932, 'n_tokens_neox': 893, 'n_words': 261}