| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 fRenderTargetContext
->origin(), | 253 fRenderTargetContext
->origin(), |
| 254 &this->surfaceProps(
))); | 254 &this->surfaceProps(
))); |
| 255 if (!newRTC) { | 255 if (!newRTC) { |
| 256 return; | 256 return; |
| 257 } | 257 } |
| 258 | 258 |
| 259 if (shouldRetainContent) { | 259 if (shouldRetainContent) { |
| 260 if (fRenderTargetContext->wasAbandoned()) { | 260 if (fRenderTargetContext->wasAbandoned()) { |
| 261 return; | 261 return; |
| 262 } | 262 } |
| 263 newRTC->copySurface(fRenderTargetContext->asTexture().get(), | 263 newRTC->copySurface(fRenderTargetContext->asDeferredTexture().get(), |
| 264 SkIRect::MakeWH(this->width(), this->height()), | 264 SkIRect::MakeWH(this->width(), this->height()), |
| 265 SkIPoint::Make(0, 0)); | 265 SkIPoint::Make(0, 0)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 fRenderTargetContext = newRTC; | 268 fRenderTargetContext = newRTC; |
| 269 } | 269 } |
| 270 | 270 |
| 271 /////////////////////////////////////////////////////////////////////////////// | 271 /////////////////////////////////////////////////////////////////////////////// |
| 272 | 272 |
| 273 void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) { | 273 void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) { |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1826 } | 1826 } |
| 1827 | 1827 |
| 1828 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { | 1828 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { |
| 1829 ASSERT_SINGLE_OWNER | 1829 ASSERT_SINGLE_OWNER |
| 1830 // We always return a transient cache, so it is freed after each | 1830 // We always return a transient cache, so it is freed after each |
| 1831 // filter traversal. | 1831 // filter traversal. |
| 1832 return SkImageFilterCache::Create(SkImageFilterCache::kDefaultTransientSize)
; | 1832 return SkImageFilterCache::Create(SkImageFilterCache::kDefaultTransientSize)
; |
| 1833 } | 1833 } |
| 1834 | 1834 |
| 1835 #endif | 1835 #endif |
| OLD | NEW |