Chromium Code Reviews| 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 "effects/GrBicubicEffect.h" | 10 #include "effects/GrBicubicEffect.h" |
| (...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1740 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 1740 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
| 1741 flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; | 1741 flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; |
| 1742 return true; | 1742 return true; |
| 1743 } | 1743 } |
| 1744 // we're cool with the paint as is | 1744 // we're cool with the paint as is |
| 1745 return false; | 1745 return false; |
| 1746 } | 1746 } |
| 1747 | 1747 |
| 1748 void SkGpuDevice::flush() { | 1748 void SkGpuDevice::flush() { |
| 1749 DO_DEFERRED_CLEAR(); | 1749 DO_DEFERRED_CLEAR(); |
| 1750 fContext->resolveRenderTarget(fRenderTarget); | 1750 fRenderTarget->prepareForExternalRead(); |
|
joshualitt
2014/11/03 21:47:45
I thought we had to flush here?
bsalomon
2014/11/03 21:54:16
The new semantics of prepareForExternalRead() mean
| |
| 1751 } | 1751 } |
| 1752 | 1752 |
| 1753 /////////////////////////////////////////////////////////////////////////////// | 1753 /////////////////////////////////////////////////////////////////////////////// |
| 1754 | 1754 |
| 1755 SkBaseDevice* SkGpuDevice::onCreateDevice(const SkImageInfo& info, Usage usage) { | 1755 SkBaseDevice* SkGpuDevice::onCreateDevice(const SkImageInfo& info, Usage usage) { |
| 1756 GrSurfaceDesc desc; | 1756 GrSurfaceDesc desc; |
| 1757 desc.fConfig = fRenderTarget->config(); | 1757 desc.fConfig = fRenderTarget->config(); |
| 1758 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 1758 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 1759 desc.fWidth = info.width(); | 1759 desc.fWidth = info.width(); |
| 1760 desc.fHeight = info.height(); | 1760 desc.fHeight = info.height(); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1852 return true; | 1852 return true; |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1855 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 1856 // We always return a transient cache, so it is freed after each | 1856 // We always return a transient cache, so it is freed after each |
| 1857 // filter traversal. | 1857 // filter traversal. |
| 1858 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1858 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 1859 } | 1859 } |
| 1860 | 1860 |
| 1861 #endif | 1861 #endif |
| OLD | NEW |