| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
| 9 | 9 |
| 10 #include "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
| (...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 | 1754 |
| 1755 /////////////////////////////////////////////////////////////////////////////// | 1755 /////////////////////////////////////////////////////////////////////////////// |
| 1756 | 1756 |
| 1757 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { | 1757 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { |
| 1758 return GrTextUtils::ShouldDisableLCD(paint); | 1758 return GrTextUtils::ShouldDisableLCD(paint); |
| 1759 } | 1759 } |
| 1760 | 1760 |
| 1761 void SkGpuDevice::flush() { | 1761 void SkGpuDevice::flush() { |
| 1762 ASSERT_SINGLE_OWNER | 1762 ASSERT_SINGLE_OWNER |
| 1763 | 1763 |
| 1764 // Clear batch debugging output | |
| 1765 // TODO not exactly sure where this should live | |
| 1766 if (GR_BATCH_DEBUGGING_OUTPUT) { | |
| 1767 SkDebugf("%s\n", fContext->getAuditTrail()->toJson().c_str()); | |
| 1768 // TODO This currently crashes because not all ops are accounted for | |
| 1769 GR_AUDIT_TRAIL_RESET(fContext->getAuditTrail()); | |
| 1770 } | |
| 1771 fRenderTarget->prepareForExternalIO(); | 1764 fRenderTarget->prepareForExternalIO(); |
| 1772 } | 1765 } |
| 1773 | 1766 |
| 1774 /////////////////////////////////////////////////////////////////////////////// | 1767 /////////////////////////////////////////////////////////////////////////////// |
| 1775 | 1768 |
| 1776 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*) { | 1769 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*) { |
| 1777 ASSERT_SINGLE_OWNER | 1770 ASSERT_SINGLE_OWNER |
| 1778 GrSurfaceDesc desc; | 1771 GrSurfaceDesc desc; |
| 1779 desc.fConfig = fRenderTarget->config(); | 1772 desc.fConfig = fRenderTarget->config(); |
| 1780 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 1773 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1890 } | 1883 } |
| 1891 | 1884 |
| 1892 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1885 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 1893 ASSERT_SINGLE_OWNER | 1886 ASSERT_SINGLE_OWNER |
| 1894 // We always return a transient cache, so it is freed after each | 1887 // We always return a transient cache, so it is freed after each |
| 1895 // filter traversal. | 1888 // filter traversal. |
| 1896 return SkGpuDevice::NewImageFilterCache(); | 1889 return SkGpuDevice::NewImageFilterCache(); |
| 1897 } | 1890 } |
| 1898 | 1891 |
| 1899 #endif | 1892 #endif |
| OLD | NEW |