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

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

Issue 1330353006: Remove GrClipTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@cliptarget
Patch Set: rebase Created 5 years, 3 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/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawTarget.h » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == this) 53 #define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == this)
54 #define RETURN_IF_ABANDONED if (fDrawingMgr.abandoned()) { return; } 54 #define RETURN_IF_ABANDONED if (fDrawingMgr.abandoned()) { return; }
55 #define RETURN_FALSE_IF_ABANDONED if (fDrawingMgr.abandoned()) { return false; } 55 #define RETURN_FALSE_IF_ABANDONED if (fDrawingMgr.abandoned()) { return false; }
56 #define RETURN_NULL_IF_ABANDONED if (fDrawingMgr.abandoned()) { return nullptr; } 56 #define RETURN_NULL_IF_ABANDONED if (fDrawingMgr.abandoned()) { return nullptr; }
57 57
58 58
59 //////////////////////////////////////////////////////////////////////////////// 59 ////////////////////////////////////////////////////////////////////////////////
60 60
61 void GrContext::DrawingMgr::init(GrContext* context) { 61 void GrContext::DrawingMgr::init(GrContext* context) {
62 fContext = context; 62 fContext = context;
63 fDrawTarget = new GrClipTarget(context); 63 fDrawTarget = new GrDrawTarget(context->getGpu(), context->resourceProvider( ));
64 } 64 }
65 65
66 void GrContext::DrawingMgr::cleanup() { 66 void GrContext::DrawingMgr::cleanup() {
67 SkSafeSetNull(fDrawTarget); 67 SkSafeSetNull(fDrawTarget);
68 for (int i = 0; i < kNumPixelGeometries; ++i) { 68 for (int i = 0; i < kNumPixelGeometries; ++i) {
69 SkSafeSetNull(fDrawContext[i][0]); 69 SkSafeSetNull(fDrawContext[i][0]);
70 SkSafeSetNull(fDrawContext[i][1]); 70 SkSafeSetNull(fDrawContext[i][1]);
71 } 71 }
72 } 72 }
73 73
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 } 752 }
753 if (maxTextureBytes) { 753 if (maxTextureBytes) {
754 *maxTextureBytes = fResourceCache->getMaxResourceBytes(); 754 *maxTextureBytes = fResourceCache->getMaxResourceBytes();
755 } 755 }
756 } 756 }
757 757
758 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) { 758 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) {
759 fResourceCache->setLimits(maxTextures, maxTextureBytes); 759 fResourceCache->setLimits(maxTextures, maxTextureBytes);
760 } 760 }
761 761
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698