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

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

Issue 683733005: GrContext no longer ever draws on Gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug fix 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
643 this->flush(); 642 this->flush();
644 } 643 }
645 } 644 }
646 645
647 bool GrInOrderDrawBuffer::geometryHints(int* vertexCount, 646 bool GrInOrderDrawBuffer::geometryHints(int* vertexCount,
648 int* indexCount) const { 647 int* indexCount) const {
649 // we will recommend a flush if the data could fit in a single 648 // we will recommend a flush if the data could fit in a single
650 // preallocated buffer but none are left and it can't fit 649 // preallocated buffer but none are left and it can't fit
651 // in the current buffer (which may not be prealloced). 650 // in the current buffer (which may not be prealloced).
652 bool flush = false; 651 bool flush = false;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); 857 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType);
859 fGpuCmdMarkers.push_back(activeTraceMarkers); 858 fGpuCmdMarkers.push_back(activeTraceMarkers);
860 } 859 }
861 } 860 }
862 861
863 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) { 862 void GrInOrderDrawBuffer::clipWillBeSet(const GrClipData* newClipData) {
864 INHERITED::clipWillBeSet(newClipData); 863 INHERITED::clipWillBeSet(newClipData);
865 fClipSet = true; 864 fClipSet = true;
866 fClipProxyState = kUnknown_ClipProxyState; 865 fClipProxyState = kUnknown_ClipProxyState;
867 } 866 }
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