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 696293004: Rename and clarify semantics of GrContext::resolveRenderTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@fix
Patch Set: Created 6 years, 1 month 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 "GrGpu.h" 13 #include "GrGpu.h"
14 #include "GrStencilBuffer.h" 14 #include "GrStencilBuffer.h"
15 15
16 void GrRenderTarget::resolve() {
17 // go through context so that all necessary flushing occurs
18 GrContext* context = this->getContext();
19 if (NULL == context) {
20 return;
21 }
22 context->resolveRenderTarget(this);
23 }
24
25 void GrRenderTarget::discard() { 16 void GrRenderTarget::discard() {
26 // go through context so that all necessary flushing occurs 17 // go through context so that all necessary flushing occurs
27 GrContext* context = this->getContext(); 18 GrContext* context = this->getContext();
28 if (NULL == context) { 19 if (NULL == context) {
29 return; 20 return;
30 } 21 }
31 context->discardRenderTarget(this); 22 context->discardRenderTarget(this);
32 } 23 }
33 24
34 void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) { 25 void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) {
(...skipping 28 matching lines...) Expand all
63 this->setStencilBuffer(NULL); 54 this->setStencilBuffer(NULL);
64 55
65 INHERITED::onRelease(); 56 INHERITED::onRelease();
66 } 57 }
67 58
68 void GrRenderTarget::onAbandon() { 59 void GrRenderTarget::onAbandon() {
69 this->setStencilBuffer(NULL); 60 this->setStencilBuffer(NULL);
70 61
71 INHERITED::onAbandon(); 62 INHERITED::onAbandon();
72 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698