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

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

Issue 2167723002: Remove SkDevice::accessRenderTarget virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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
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 // 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
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
OLDNEW
« include/core/SkDevice.h ('K') | « src/gpu/SkGpuDevice.h ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698