OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "SkTLazy.h" | 31 #include "SkTLazy.h" |
32 #include "SkTLS.h" | 32 #include "SkTLS.h" |
33 #include "SkTrace.h" | 33 #include "SkTrace.h" |
34 | 34 |
35 SK_DEFINE_INST_COUNT(GrContext) | 35 SK_DEFINE_INST_COUNT(GrContext) |
36 SK_DEFINE_INST_COUNT(GrDrawState) | 36 SK_DEFINE_INST_COUNT(GrDrawState) |
37 | 37 |
38 // It can be useful to set this to false to test whether a bug is caused by usin
g the | 38 // It can be useful to set this to false to test whether a bug is caused by usin
g the |
39 // InOrderDrawBuffer, to compare performance of using/not using InOrderDrawBuffe
r, or to make | 39 // InOrderDrawBuffer, to compare performance of using/not using InOrderDrawBuffe
r, or to make |
40 // debugging simpler. | 40 // debugging simpler. |
41 SK_CONF_DECLARE(bool, c_Defer, "gpu.deferContext", false, | 41 SK_CONF_DECLARE(bool, c_Defer, "gpu.deferContext", true, |
42 "Defers rendering in GrContext via GrInOrderDrawBuffer."); | 42 "Defers rendering in GrContext via GrInOrderDrawBuffer."); |
43 | 43 |
44 #define BUFFERED_DRAW (c_Defer ? kYes_BufferedDraw : kNo_BufferedDraw) | 44 #define BUFFERED_DRAW (c_Defer ? kYes_BufferedDraw : kNo_BufferedDraw) |
45 | 45 |
46 // When we're using coverage AA but the blend is incompatible (given gpu | 46 // When we're using coverage AA but the blend is incompatible (given gpu |
47 // limitations) should we disable AA or draw wrong? | 47 // limitations) should we disable AA or draw wrong? |
48 #define DISABLE_COVERAGE_AA_FOR_BLEND 1 | 48 #define DISABLE_COVERAGE_AA_FOR_BLEND 1 |
49 | 49 |
50 #ifdef SK_DEBUG | 50 #ifdef SK_DEBUG |
51 // change this to a 1 to see notifications when partial coverage fails | 51 // change this to a 1 to see notifications when partial coverage fails |
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 return NULL; | 1743 return NULL; |
1744 } | 1744 } |
1745 } | 1745 } |
1746 | 1746 |
1747 /////////////////////////////////////////////////////////////////////////////// | 1747 /////////////////////////////////////////////////////////////////////////////// |
1748 #if GR_CACHE_STATS | 1748 #if GR_CACHE_STATS |
1749 void GrContext::printCacheStats() const { | 1749 void GrContext::printCacheStats() const { |
1750 fTextureCache->printStats(); | 1750 fTextureCache->printStats(); |
1751 } | 1751 } |
1752 #endif | 1752 #endif |
OLD | NEW |