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

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

Issue 1930623003: Clean up test drawContext usage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix typo 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') | tests/SurfaceTest.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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 SkASSERT(draw.fClipStack && draw.fClipStack == fClipStack); 340 SkASSERT(draw.fClipStack && draw.fClipStack == fClipStack);
341 341
342 fClip.setClipStack(fClipStack, &this->getOrigin()); 342 fClip.setClipStack(fClipStack, &this->getOrigin());
343 } 343 }
344 344
345 GrRenderTarget* SkGpuDevice::accessRenderTarget() { 345 GrRenderTarget* SkGpuDevice::accessRenderTarget() {
346 ASSERT_SINGLE_OWNER 346 ASSERT_SINGLE_OWNER
347 return fRenderTarget; 347 return fRenderTarget;
348 } 348 }
349 349
350 GrDrawContext* SkGpuDevice::accessDrawContext() {
351 ASSERT_SINGLE_OWNER
352 return fDrawContext.get();
353 }
354
350 void SkGpuDevice::clearAll() { 355 void SkGpuDevice::clearAll() {
351 ASSERT_SINGLE_OWNER 356 ASSERT_SINGLE_OWNER
352 GrColor color = 0; 357 GrColor color = 0;
353 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "clearAll", fContext); 358 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "clearAll", fContext);
354 SkIRect rect = SkIRect::MakeWH(this->width(), this->height()); 359 SkIRect rect = SkIRect::MakeWH(this->width(), this->height());
355 fDrawContext->clear(&rect, color, true); 360 fDrawContext->clear(&rect, color, true);
356 } 361 }
357 362
358 void SkGpuDevice::replaceRenderTarget(bool shouldRetainContent) { 363 void SkGpuDevice::replaceRenderTarget(bool shouldRetainContent) {
359 ASSERT_SINGLE_OWNER 364 ASSERT_SINGLE_OWNER
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 } 1846 }
1842 1847
1843 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { 1848 SkImageFilterCache* SkGpuDevice::getImageFilterCache() {
1844 ASSERT_SINGLE_OWNER 1849 ASSERT_SINGLE_OWNER
1845 // We always return a transient cache, so it is freed after each 1850 // We always return a transient cache, so it is freed after each
1846 // filter traversal. 1851 // filter traversal.
1847 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); 1852 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize);
1848 } 1853 }
1849 1854
1850 #endif 1855 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698