| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 } | 334 } |
| 335 | 335 |
| 336 // call this every draw call, to ensure that the context reflects our state, | 336 // call this every draw call, to ensure that the context reflects our state, |
| 337 // and not the state from some other canvas/device | 337 // and not the state from some other canvas/device |
| 338 void SkGpuDevice::prepareDraw(const SkDraw& draw) { | 338 void SkGpuDevice::prepareDraw(const SkDraw& draw) { |
| 339 ASSERT_SINGLE_OWNER | 339 ASSERT_SINGLE_OWNER |
| 340 SkASSERT(fClipStack.get()); | 340 SkASSERT(fClipStack.get()); |
| 341 | 341 |
| 342 SkASSERT(draw.fClipStack && draw.fClipStack == fClipStack); | 342 SkASSERT(draw.fClipStack && draw.fClipStack == fClipStack); |
| 343 | 343 |
| 344 fClip.setClipStack(fClipStack, &this->getOrigin()); | 344 fClip.reset(fClipStack, &this->getOrigin()); |
| 345 } | 345 } |
| 346 | 346 |
| 347 GrRenderTarget* SkGpuDevice::accessRenderTarget() { | 347 GrRenderTarget* SkGpuDevice::accessRenderTarget() { |
| 348 ASSERT_SINGLE_OWNER | 348 ASSERT_SINGLE_OWNER |
| 349 return fRenderTarget; | 349 return fRenderTarget; |
| 350 } | 350 } |
| 351 | 351 |
| 352 GrDrawContext* SkGpuDevice::accessDrawContext() { | 352 GrDrawContext* SkGpuDevice::accessDrawContext() { |
| 353 ASSERT_SINGLE_OWNER | 353 ASSERT_SINGLE_OWNER |
| 354 return fDrawContext.get(); | 354 return fDrawContext.get(); |
| (...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 } | 1847 } |
| 1848 | 1848 |
| 1849 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { | 1849 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { |
| 1850 ASSERT_SINGLE_OWNER | 1850 ASSERT_SINGLE_OWNER |
| 1851 // We always return a transient cache, so it is freed after each | 1851 // We always return a transient cache, so it is freed after each |
| 1852 // filter traversal. | 1852 // filter traversal. |
| 1853 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); | 1853 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); |
| 1854 } | 1854 } |
| 1855 | 1855 |
| 1856 #endif | 1856 #endif |
| OLD | NEW |