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

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

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning Created 5 years, 11 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.cpp ('k') | src/gpu/GrOvalRenderer.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 * 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 "GrOptDrawState.h" 8 #include "GrOptDrawState.h"
9 9
10 #include "GrDrawState.h" 10 #include "GrDrawState.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // indicate that this can be skipped. 66 // indicate that this can be skipped.
67 fFlags = 0; 67 fFlags = 0;
68 fDrawFace = GrDrawState::kInvalid_DrawFace; 68 fDrawFace = GrDrawState::kInvalid_DrawFace;
69 fViewMatrix.reset(); 69 fViewMatrix.reset();
70 return; 70 return;
71 } 71 }
72 72
73 fRenderTarget.reset(drawState.fRenderTarget.get()); 73 fRenderTarget.reset(drawState.fRenderTarget.get());
74 SkASSERT(fRenderTarget); 74 SkASSERT(fRenderTarget);
75 fScissorState = scissorState; 75 fScissorState = scissorState;
76 fViewMatrix = drawState.getViewMatrix(); 76 fViewMatrix = fPrimitiveProcessor->viewMatrix();
77 fStencilSettings = drawState.getStencil(); 77 fStencilSettings = drawState.getStencil();
78 fDrawFace = drawState.getDrawFace(); 78 fDrawFace = drawState.getDrawFace();
79 // TODO move this out of optDrawState 79 // TODO move this out of optDrawState
80 if (dstCopy) { 80 if (dstCopy) {
81 fDstCopy = *dstCopy; 81 fDstCopy = *dstCopy;
82 } 82 }
83 83
84 fFlags = 0; 84 fFlags = 0;
85 if (drawState.isHWAntialias()) { 85 if (drawState.isHWAntialias()) {
86 fFlags |= kHWAA_Flag; 86 fFlags |= kHWAA_Flag;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 206 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
207 return false; 207 return false;
208 } 208 }
209 } 209 }
210 210
211 // Now update the GrPrimitiveProcessor's batch tracker 211 // Now update the GrPrimitiveProcessor's batch tracker
212 fPrimitiveProcessor->makeEqual(&fBatchTracker, that.getBatchTracker()); 212 fPrimitiveProcessor->makeEqual(&fBatchTracker, that.getBatchTracker());
213 return true; 213 return true;
214 } 214 }
215 215
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrOvalRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698