Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: fix crash Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698