2010-12-22 21:39:39 +00:00
|
|
|
|
2011-07-28 14:26:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2010 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
2010-12-22 21:39:39 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GrConfig_DEFINED
|
|
|
|
#define GrConfig_DEFINED
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "include/core/SkTypes.h"
|
2012-08-31 13:07:37 +00:00
|
|
|
|
2010-12-22 21:39:39 +00:00
|
|
|
/**
|
|
|
|
* Gr defines are set to 0 or 1, rather than being undefined or defined
|
|
|
|
*/
|
|
|
|
|
2012-08-31 13:07:37 +00:00
|
|
|
#if !defined(GR_CACHE_STATS)
|
2016-04-29 13:41:35 +00:00
|
|
|
#if defined(SK_DEBUG) || defined(SK_DUMP_STATS)
|
2014-10-24 16:34:41 +00:00
|
|
|
#define GR_CACHE_STATS 1
|
|
|
|
#else
|
|
|
|
#define GR_CACHE_STATS 0
|
|
|
|
#endif
|
2012-08-31 13:07:37 +00:00
|
|
|
#endif
|
2010-12-22 21:39:39 +00:00
|
|
|
|
2014-09-18 20:52:08 +00:00
|
|
|
#if !defined(GR_GPU_STATS)
|
2018-12-07 16:20:33 +00:00
|
|
|
#if defined(SK_DEBUG) || defined(SK_DUMP_STATS) || defined(GR_TEST_UTILS)
|
2014-10-24 16:34:41 +00:00
|
|
|
#define GR_GPU_STATS 1
|
|
|
|
#else
|
|
|
|
#define GR_GPU_STATS 0
|
|
|
|
#endif
|
2014-09-18 20:52:08 +00:00
|
|
|
#endif
|
|
|
|
|
2012-11-06 18:36:33 +00:00
|
|
|
#endif
|
2011-03-21 19:51:57 +00:00
|
|
|
|
2010-12-22 21:39:39 +00:00
|
|
|
/**
|
|
|
|
* GR_STRING makes a string of X where X is expanded before conversion to a string
|
|
|
|
* if X itself contains macros.
|
|
|
|
*/
|
|
|
|
#define GR_STRING(X) GR_STRING_IMPL(X)
|
|
|
|
#define GR_STRING_IMPL(X) #X
|
|
|
|
|
|
|
|
/**
|
2011-02-14 16:51:21 +00:00
|
|
|
* GR_CONCAT concatenates X and Y where each is expanded before
|
2010-12-22 21:39:39 +00:00
|
|
|
* contanenation if either contains macros.
|
|
|
|
*/
|
|
|
|
#define GR_CONCAT(X,Y) GR_CONCAT_IMPL(X,Y)
|
|
|
|
#define GR_CONCAT_IMPL(X,Y) X##Y
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a string of the form "<filename>(<linenumber>) : "
|
|
|
|
*/
|
|
|
|
#define GR_FILE_AND_LINE_STR __FILE__ "(" GR_STRING(__LINE__) ") : "
|