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/GrRenderTarget.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT 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/GrReducedClip.cpp ('k') | src/gpu/GrReorderCommandBuilder.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 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 "GrGpu.h" 14 #include "GrGpu.h"
15 #include "GrRenderTargetPriv.h" 15 #include "GrRenderTargetPriv.h"
16 #include "GrStencilAttachment.h" 16 #include "GrStencilAttachment.h"
17 17
18 void GrRenderTarget::discard() { 18 void GrRenderTarget::discard() {
19 // go through context so that all necessary flushing occurs 19 // go through context so that all necessary flushing occurs
20 GrContext* context = this->getContext(); 20 GrContext* context = this->getContext();
21 GrDrawContext* drawContext = context ? context->drawContext() : NULL; 21 GrDrawContext* drawContext = context ? context->drawContext() : nullptr;
22 if (!drawContext) { 22 if (!drawContext) {
23 return; 23 return;
24 } 24 }
25 25
26 drawContext->discard(this); 26 drawContext->discard(this);
27 } 27 }
28 28
29 void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) { 29 void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) {
30 if (kCanResolve_ResolveType == getResolveType()) { 30 if (kCanResolve_ResolveType == getResolveType()) {
31 if (rect) { 31 if (rect) {
(...skipping 12 matching lines...) Expand all
44 if (fResolveRect.isEmpty()) { 44 if (fResolveRect.isEmpty()) {
45 fResolveRect.setLargestInverted(); 45 fResolveRect.setLargestInverted();
46 } else { 46 } else {
47 if (!fResolveRect.intersect(0, 0, this->width(), this->height())) { 47 if (!fResolveRect.intersect(0, 0, this->width(), this->height())) {
48 fResolveRect.setLargestInverted(); 48 fResolveRect.setLargestInverted();
49 } 49 }
50 } 50 }
51 } 51 }
52 52
53 void GrRenderTarget::onRelease() { 53 void GrRenderTarget::onRelease() {
54 this->renderTargetPriv().didAttachStencilAttachment(NULL); 54 this->renderTargetPriv().didAttachStencilAttachment(nullptr);
55 55
56 INHERITED::onRelease(); 56 INHERITED::onRelease();
57 } 57 }
58 58
59 void GrRenderTarget::onAbandon() { 59 void GrRenderTarget::onAbandon() {
60 this->renderTargetPriv().didAttachStencilAttachment(NULL); 60 this->renderTargetPriv().didAttachStencilAttachment(nullptr);
61 61
62 INHERITED::onAbandon(); 62 INHERITED::onAbandon();
63 } 63 }
64 64
65 /////////////////////////////////////////////////////////////////////////////// 65 ///////////////////////////////////////////////////////////////////////////////
66 66
67 void GrRenderTargetPriv::didAttachStencilAttachment(GrStencilAttachment* stencil Attachment) { 67 void GrRenderTargetPriv::didAttachStencilAttachment(GrStencilAttachment* stencil Attachment) {
68 SkRefCnt_SafeAssign(fRenderTarget->fStencilAttachment, stencilAttachment); 68 SkRefCnt_SafeAssign(fRenderTarget->fStencilAttachment, stencilAttachment);
69 } 69 }
70 70
71 GrStencilAttachment* GrRenderTargetPriv::attachStencilAttachment() const { 71 GrStencilAttachment* GrRenderTargetPriv::attachStencilAttachment() const {
72 if (fRenderTarget->fStencilAttachment) { 72 if (fRenderTarget->fStencilAttachment) {
73 return fRenderTarget->fStencilAttachment; 73 return fRenderTarget->fStencilAttachment;
74 } 74 }
75 if (!fRenderTarget->wasDestroyed() && fRenderTarget->canAttemptStencilAttach ment()) { 75 if (!fRenderTarget->wasDestroyed() && fRenderTarget->canAttemptStencilAttach ment()) {
76 fRenderTarget->getGpu()->attachStencilAttachmentToRenderTarget(fRenderTa rget); 76 fRenderTarget->getGpu()->attachStencilAttachmentToRenderTarget(fRenderTa rget);
77 } 77 }
78 return fRenderTarget->fStencilAttachment; 78 return fRenderTarget->fStencilAttachment;
79 } 79 }
OLDNEW
« no previous file with comments | « src/gpu/GrReducedClip.cpp ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698