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" |
11 | 11 |
12 #include "effects/GrConvolutionEffect.h" | 12 #include "effects/GrConvolutionEffect.h" |
13 #include "effects/GrSingleTextureEffect.h" | 13 #include "effects/GrSingleTextureEffect.h" |
14 #include "effects/GrConfigConversionEffect.h" | 14 #include "effects/GrConfigConversionEffect.h" |
15 | 15 |
16 #include "GrBufferAllocPool.h" | 16 #include "GrBufferAllocPool.h" |
17 #include "GrGpu.h" | 17 #include "GrGpu.h" |
| 18 #include "GrDrawTargetCaps.h" |
18 #include "GrIndexBuffer.h" | 19 #include "GrIndexBuffer.h" |
19 #include "GrInOrderDrawBuffer.h" | 20 #include "GrInOrderDrawBuffer.h" |
20 #include "GrOvalRenderer.h" | 21 #include "GrOvalRenderer.h" |
21 #include "GrPathRenderer.h" | 22 #include "GrPathRenderer.h" |
22 #include "GrPathUtils.h" | 23 #include "GrPathUtils.h" |
23 #include "GrResourceCache.h" | 24 #include "GrResourceCache.h" |
24 #include "GrSoftwarePathRenderer.h" | 25 #include "GrSoftwarePathRenderer.h" |
25 #include "GrStencilBuffer.h" | 26 #include "GrStencilBuffer.h" |
26 #include "GrTextStrike.h" | 27 #include "GrTextStrike.h" |
27 #include "SkRTConf.h" | 28 #include "SkRTConf.h" |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 } | 567 } |
567 | 568 |
568 GrRenderTarget* GrContext::wrapBackendRenderTarget(const GrBackendRenderTargetDe
sc& desc) { | 569 GrRenderTarget* GrContext::wrapBackendRenderTarget(const GrBackendRenderTargetDe
sc& desc) { |
569 return fGpu->wrapBackendRenderTarget(desc); | 570 return fGpu->wrapBackendRenderTarget(desc); |
570 } | 571 } |
571 | 572 |
572 /////////////////////////////////////////////////////////////////////////////// | 573 /////////////////////////////////////////////////////////////////////////////// |
573 | 574 |
574 bool GrContext::supportsIndex8PixelConfig(const GrTextureParams* params, | 575 bool GrContext::supportsIndex8PixelConfig(const GrTextureParams* params, |
575 int width, int height) const { | 576 int width, int height) const { |
576 const GrDrawTarget::Caps* caps = fGpu->caps(); | 577 const GrDrawTargetCaps* caps = fGpu->caps(); |
577 if (!caps->eightBitPaletteSupport()) { | 578 if (!caps->eightBitPaletteSupport()) { |
578 return false; | 579 return false; |
579 } | 580 } |
580 | 581 |
581 bool isPow2 = GrIsPow2(width) && GrIsPow2(height); | 582 bool isPow2 = GrIsPow2(width) && GrIsPow2(height); |
582 | 583 |
583 if (!isPow2) { | 584 if (!isPow2) { |
584 bool tiled = NULL != params && params->isTiled(); | 585 bool tiled = NULL != params && params->isTiled(); |
585 if (tiled && !caps->npotTextureTileSupport()) { | 586 if (tiled && !caps->npotTextureTileSupport()) { |
586 return false; | 587 return false; |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1807 return srcTexture; | 1808 return srcTexture; |
1808 } | 1809 } |
1809 } | 1810 } |
1810 | 1811 |
1811 /////////////////////////////////////////////////////////////////////////////// | 1812 /////////////////////////////////////////////////////////////////////////////// |
1812 #if GR_CACHE_STATS | 1813 #if GR_CACHE_STATS |
1813 void GrContext::printCacheStats() const { | 1814 void GrContext::printCacheStats() const { |
1814 fTextureCache->printStats(); | 1815 fTextureCache->printStats(); |
1815 } | 1816 } |
1816 #endif | 1817 #endif |
OLD | NEW |