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

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

Issue 694983002: Revert of GrContext no longer ever draws on Gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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') | no next file » | 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 bool targetHasReservedGeom = fDstGpu->hasReservedVerticesOrIndices(); 632 bool targetHasReservedGeom = fDstGpu->hasReservedVerticesOrIndices();
633 633
634 int vcount = vertexCount; 634 int vcount = vertexCount;
635 int icount = indexCount; 635 int icount = indexCount;
636 636
637 if (!insideGeoPush && 637 if (!insideGeoPush &&
638 !unreleasedVertexSpace && 638 !unreleasedVertexSpace &&
639 !unreleasedIndexSpace && 639 !unreleasedIndexSpace &&
640 !targetHasReservedGeom && 640 !targetHasReservedGeom &&
641 this->geometryHints(&vcount, &icount)) { 641 this->geometryHints(&vcount, &icount)) {
642
642 this->flush(); 643 this->flush();
643 } 644 }
644 } 645 }
645 646
646 bool GrInOrderDrawBuffer::geometryHints(int* vertexCount, 647 bool GrInOrderDrawBuffer::geometryHints(int* vertexCount,
647 int* indexCount) const { 648 int* indexCount) const {
648 // we will recommend a flush if the data could fit in a single 649 // we will recommend a flush if the data could fit in a single
649 // preallocated buffer but none are left and it can't fit 650 // preallocated buffer but none are left and it can't fit
650 // in the current buffer (which may not be prealloced). 651 // in the current buffer (which may not be prealloced).
651 bool flush = false; 652 bool flush = false;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); 858 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType);
858 fGpuCmdMarkers.push_back(activeTraceMarkers); 859 fGpuCmdMarkers.push_back(activeTraceMarkers);
859 } 860 }
860 } 861 }
861 862
862 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { 863 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) {
863 INHERITED::clipWillBeSet(newClipData); 864 INHERITED::clipWillBeSet(newClipData);
864 fClipSet = true; 865 fClipSet = true;
865 fClipProxyState = kUnknown_ClipProxyState; 866 fClipProxyState = kUnknown_ClipProxyState;
866 } 867 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698