| 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 #include "GrContext.h" | 9 #include "GrContext.h" |
| 10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 return 0; | 565 return 0; |
| 566 } | 566 } |
| 567 int chosenSampleCount = 0; | 567 int chosenSampleCount = 0; |
| 568 if (fGpu->caps()->shaderCaps()->pathRenderingSupport()) { | 568 if (fGpu->caps()->shaderCaps()->pathRenderingSupport()) { |
| 569 if (dpi >= 250.0f) { | 569 if (dpi >= 250.0f) { |
| 570 chosenSampleCount = 4; | 570 chosenSampleCount = 4; |
| 571 } else { | 571 } else { |
| 572 chosenSampleCount = 16; | 572 chosenSampleCount = 16; |
| 573 } | 573 } |
| 574 } | 574 } |
| 575 return chosenSampleCount <= fGpu->caps()->maxSampleCount() ? | 575 return chosenSampleCount <= fGpu->caps()->maxSampleCount() ? chosenSampleCou
nt : 0; |
| 576 chosenSampleCount : 0; | |
| 577 } | 576 } |
| 578 | 577 |
| 579 | 578 |
| 580 GrDrawContext* GrContext::drawContext(GrRenderTarget* rt, const SkSurfaceProps*
surfaceProps) { | 579 GrDrawContext* GrContext::drawContext(GrRenderTarget* rt, const SkSurfaceProps*
surfaceProps) { |
| 581 ASSERT_SINGLE_OWNER | 580 ASSERT_SINGLE_OWNER |
| 582 return fDrawingManager->drawContext(rt, surfaceProps); | 581 return fDrawingManager->drawContext(rt, surfaceProps); |
| 583 } | 582 } |
| 584 | 583 |
| 585 bool GrContext::abandoned() const { | 584 bool GrContext::abandoned() const { |
| 586 ASSERT_SINGLE_OWNER | 585 ASSERT_SINGLE_OWNER |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 ASSERT_SINGLE_OWNER | 661 ASSERT_SINGLE_OWNER |
| 663 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 662 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
| 664 } | 663 } |
| 665 | 664 |
| 666 ////////////////////////////////////////////////////////////////////////////// | 665 ////////////////////////////////////////////////////////////////////////////// |
| 667 | 666 |
| 668 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 667 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
| 669 ASSERT_SINGLE_OWNER | 668 ASSERT_SINGLE_OWNER |
| 670 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 669 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
| 671 } | 670 } |
| OLD | NEW |