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

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

Issue 594543004: Revert of Don't flush on read/write pixels unless necessary (Closed) Base URL: https://skia.googlesource.com/skia.git@iotype
Patch Set: Created 6 years, 2 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/GrContext.cpp ('k') | src/gpu/GrSurface.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 2011 Google Inc. 2 * Copyright 2011 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 "GrInOrderDrawBuffer.h" 8 #include "GrInOrderDrawBuffer.h"
9 9
10 #include "GrBufferAllocPool.h" 10 #include "GrBufferAllocPool.h"
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 } 826 }
827 if (kReserved_GeometrySrcType == restoredState.fIndexSrc || 827 if (kReserved_GeometrySrcType == restoredState.fIndexSrc ||
828 kArray_GeometrySrcType == restoredState.fIndexSrc) { 828 kArray_GeometrySrcType == restoredState.fIndexSrc) {
829 poolState.fUsedPoolIndexBytes = sizeof(uint16_t) * 829 poolState.fUsedPoolIndexBytes = sizeof(uint16_t) *
830 restoredState.fIndexCount; 830 restoredState.fIndexCount;
831 } 831 }
832 } 832 }
833 833
834 void GrInOrderDrawBuffer::recordStateIfNecessary() { 834 void GrInOrderDrawBuffer::recordStateIfNecessary() {
835 if (fStates.empty()) { 835 if (fStates.empty()) {
836 this->convertDrawStateToPendingExec(&fStates.push_back(this->getDrawStat e())); 836 fStates.push_back() = this->getDrawState();
837 this->addToCmdBuffer(kSetState_Cmd); 837 this->addToCmdBuffer(kSetState_Cmd);
838 return; 838 return;
839 } 839 }
840 const GrDrawState& curr = this->getDrawState(); 840 const GrDrawState& curr = this->getDrawState();
841 GrDrawState& prev = fStates.back(); 841 GrDrawState& prev = fStates.back();
842 switch (GrDrawState::CombineIfPossible(prev, curr, *this->caps())) { 842 switch (GrDrawState::CombineIfPossible(prev, curr, *this->caps())) {
843 case GrDrawState::kIncompatible_CombinedState: 843 case GrDrawState::kIncompatible_CombinedState:
844 this->convertDrawStateToPendingExec(&fStates.push_back(curr)); 844 this->convertDrawStateToPendingExec(&fStates.push_back(curr));
845 this->addToCmdBuffer(kSetState_Cmd); 845 this->addToCmdBuffer(kSetState_Cmd);
846 break; 846 break;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 GrSurfa ce* src) { 918 GrSurfa ce* src) {
919 this->addToCmdBuffer(kCopySurface_Cmd); 919 this->addToCmdBuffer(kCopySurface_Cmd);
920 return GrNEW_APPEND_TO_ALLOCATOR(&fCopySurfaces, CopySurface, (dst, src)); 920 return GrNEW_APPEND_TO_ALLOCATOR(&fCopySurfaces, CopySurface, (dst, src));
921 } 921 }
922 922
923 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { 923 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) {
924 INHERITED::clipWillBeSet(newClipData); 924 INHERITED::clipWillBeSet(newClipData);
925 fClipSet = true; 925 fClipSet = true;
926 fClipProxyState = kUnknown_ClipProxyState; 926 fClipProxyState = kUnknown_ClipProxyState;
927 } 927 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698