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

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

Issue 1413673002: Remove DrawingMgr shims from GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove abandon, reset & flush from public DrawingMgr API Created 5 years, 2 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 /* 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 9
10 #include "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
11 11
12 #include "GrContext.h" 12 #include "GrContext.h"
13 #include "GrDrawContext.h" 13 #include "GrDrawContext.h"
14 #include "GrDrawTarget.h" 14 #include "GrDrawTarget.h"
15 #include "GrGpu.h" 15 #include "GrGpu.h"
16 #include "GrRenderTargetPriv.h" 16 #include "GrRenderTargetPriv.h"
17 #include "GrStencilAttachment.h" 17 #include "GrStencilAttachment.h"
18 18
19 void GrRenderTarget::discard() { 19 void GrRenderTarget::discard() {
20 // go through context so that all necessary flushing occurs 20 // go through context so that all necessary flushing occurs
21 GrContext* context = this->getContext(); 21 GrContext* context = this->getContext();
22 if (!context) { 22 if (!context) {
23 return; 23 return;
24 } 24 }
25 25
26 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(this)); 26 SkAutoTUnref<GrDrawContext> drawContext(context->drawingMgr().drawContext(th is));
27 if (!drawContext) { 27 if (!drawContext) {
28 return; 28 return;
29 } 29 }
30 30
31 drawContext->discard(); 31 drawContext->discard();
32 } 32 }
33 33
34 void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) { 34 void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) {
35 if (kCanResolve_ResolveType == getResolveType()) { 35 if (kCanResolve_ResolveType == getResolveType()) {
36 if (rect) { 36 if (rect) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // we're not acctually adding one. 85 // we're not acctually adding one.
86 return true; 86 return true;
87 } 87 }
88 fRenderTarget->fStencilAttachment = stencil; 88 fRenderTarget->fStencilAttachment = stencil;
89 if (!fRenderTarget->completeStencilAttachment()) { 89 if (!fRenderTarget->completeStencilAttachment()) {
90 SkSafeSetNull(fRenderTarget->fStencilAttachment); 90 SkSafeSetNull(fRenderTarget->fStencilAttachment);
91 return false; 91 return false;
92 } 92 }
93 return true; 93 return true;
94 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698