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

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

Issue 579403003: Move IOType to GrGpuRef and rename that to GrIORef. Template GrPendingIORef on IOType. (Closed) Base URL: https://skia.googlesource.com/skia.git@ref
Patch Set: rebase again Created 6 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/GrInOrderDrawBuffer.h ('k') | src/gpu/GrTextureAccess.cpp » ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrRODrawState.h" 8 #include "GrRODrawState.h"
9 9
10 #include "GrDrawTargetCaps.h" 10 #include "GrDrawTargetCaps.h"
11 #include "GrRenderTarget.h" 11 #include "GrRenderTarget.h"
12 12
13 //////////////////////////////////////////////////////////////////////////////// 13 ////////////////////////////////////////////////////////////////////////////////
14 14
15 GrRODrawState::GrRODrawState(const GrRODrawState& drawState) : INHERITED() { 15 GrRODrawState::GrRODrawState(const GrRODrawState& drawState) : INHERITED() {
16 fRenderTarget.setResource(SkSafeRef(drawState.fRenderTarget.getResource()), 16 fRenderTarget.setResource(SkSafeRef(drawState.fRenderTarget.getResource()),
17 GrGpuResourceRef::kWrite_IOType); 17 GrIORef::kWrite_IOType);
18 } 18 }
19 19
20 bool GrRODrawState::isEqual(const GrRODrawState& that) const { 20 bool GrRODrawState::isEqual(const GrRODrawState& that) const {
21 bool usingVertexColors = this->hasColorVertexAttribute(); 21 bool usingVertexColors = this->hasColorVertexAttribute();
22 if (!usingVertexColors && this->fColor != that.fColor) { 22 if (!usingVertexColors && this->fColor != that.fColor) {
23 return false; 23 return false;
24 } 24 }
25 25
26 if (this->getRenderTarget() != that.getRenderTarget() || 26 if (this->getRenderTarget() != that.getRenderTarget() ||
27 this->fColorStages.count() != that.fColorStages.count() || 27 this->fColorStages.count() != that.fColorStages.count() ||
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // Since the shader will multiply coverage and color, the only way the f inal A==1 is if 346 // Since the shader will multiply coverage and color, the only way the f inal A==1 is if
347 // coverage and color both have A==1. 347 // coverage and color both have A==1.
348 return (kA_GrColorComponentFlag & validComponentFlags & coverageComponen tFlags) && 348 return (kA_GrColorComponentFlag & validComponentFlags & coverageComponen tFlags) &&
349 0xFF == GrColorUnpackA(color) && 0xFF == GrColorUnpackA(coverage ); 349 0xFF == GrColorUnpackA(color) && 0xFF == GrColorUnpackA(coverage );
350 350
351 } 351 }
352 352
353 return (kA_GrColorComponentFlag & validComponentFlags) && 0xFF == GrColorUnp ackA(color); 353 return (kA_GrColorComponentFlag & validComponentFlags) && 0xFF == GrColorUnp ackA(color);
354 } 354 }
355 355
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/GrTextureAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698