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

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

Issue 753783003: Remove GrSurface::isSameAs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 6 years 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 2012 Google Inc. 2 * Copyright 2012 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 "GrSurface.h" 8 #include "GrSurface.h"
9 #include "GrSurfacePriv.h" 9 #include "GrSurfacePriv.h"
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 const GrTexture* thisTex = this->asTexture(); 116 const GrTexture* thisTex = this->asTexture();
117 if (thisTex && thisTex->internalHasPendingIO()) { 117 if (thisTex && thisTex->internalHasPendingIO()) {
118 return true; 118 return true;
119 } 119 }
120 const GrRenderTarget* thisRT = this->asRenderTarget(); 120 const GrRenderTarget* thisRT = this->asRenderTarget();
121 if (thisRT && thisRT->internalHasPendingIO()) { 121 if (thisRT && thisRT->internalHasPendingIO()) {
122 return true; 122 return true;
123 } 123 }
124 return false; 124 return false;
125 } 125 }
126
127 bool GrSurface::isSameAs(const GrSurface* other) const {
128 const GrRenderTarget* thisRT = this->asRenderTarget();
129 if (thisRT) {
130 return thisRT == other->asRenderTarget();
131 } else {
132 const GrTexture* thisTex = this->asTexture();
133 SkASSERT(thisTex); // We must be one or the other
134 return thisTex == other->asTexture();
135 }
136 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrSurfacePriv.h » ('j') | tests/GrSurfaceTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698