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 // and not the state from some other canvas/device | 334 // and not the state from some other canvas/device |
335 void SkGpuDevice::prepareDraw(const SkDraw& draw) { | 335 void SkGpuDevice::prepareDraw(const SkDraw& draw) { |
336 ASSERT_SINGLE_OWNER | 336 ASSERT_SINGLE_OWNER |
337 SkASSERT(fClipStack.get()); | 337 SkASSERT(fClipStack.get()); |
338 | 338 |
339 SkASSERT(draw.fClipStack && draw.fClipStack == fClipStack); | 339 SkASSERT(draw.fClipStack && draw.fClipStack == fClipStack); |
340 | 340 |
341 fClip.reset(fClipStack, &this->getOrigin()); | 341 fClip.reset(fClipStack, &this->getOrigin()); |
342 } | 342 } |
343 | 343 |
344 GrRenderTarget* SkGpuDevice::accessRenderTarget() { | |
345 ASSERT_SINGLE_OWNER | |
346 return fRenderTarget.get(); | |
347 } | |
348 | |
349 GrDrawContext* SkGpuDevice::accessDrawContext() { | 344 GrDrawContext* SkGpuDevice::accessDrawContext() { |
350 ASSERT_SINGLE_OWNER | 345 ASSERT_SINGLE_OWNER |
351 return fDrawContext.get(); | 346 return fDrawContext.get(); |
352 } | 347 } |
353 | 348 |
354 void SkGpuDevice::clearAll() { | 349 void SkGpuDevice::clearAll() { |
355 ASSERT_SINGLE_OWNER | 350 ASSERT_SINGLE_OWNER |
356 GrColor color = 0; | 351 GrColor color = 0; |
357 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "clearAll", fContext); | 352 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "clearAll", fContext); |
358 SkIRect rect = SkIRect::MakeWH(this->width(), this->height()); | 353 SkIRect rect = SkIRect::MakeWH(this->width(), this->height()); |
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1905 } | 1900 } |
1906 | 1901 |
1907 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { | 1902 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { |
1908 ASSERT_SINGLE_OWNER | 1903 ASSERT_SINGLE_OWNER |
1909 // We always return a transient cache, so it is freed after each | 1904 // We always return a transient cache, so it is freed after each |
1910 // filter traversal. | 1905 // filter traversal. |
1911 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); | 1906 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); |
1912 } | 1907 } |
1913 | 1908 |
1914 #endif | 1909 #endif |
OLD | NEW |