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

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

Issue 709003006: cleanup friends in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup_geometry_handling
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/GrInOrderDrawBuffer.h ('k') | src/gpu/GrTest.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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 prevDrawState->unref(); 466 prevDrawState->unref();
467 this->reset(); 467 this->reset();
468 ++fDrawID; 468 ++fDrawID;
469 } 469 }
470 470
471 void GrInOrderDrawBuffer::Draw::execute(GrGpu* gpu) { 471 void GrInOrderDrawBuffer::Draw::execute(GrGpu* gpu) {
472 gpu->setVertexSourceToBuffer(this->vertexBuffer()); 472 gpu->setVertexSourceToBuffer(this->vertexBuffer());
473 if (fInfo.isIndexed()) { 473 if (fInfo.isIndexed()) {
474 gpu->setIndexSourceToBuffer(this->indexBuffer()); 474 gpu->setIndexSourceToBuffer(this->indexBuffer());
475 } 475 }
476 gpu->onDraw(fInfo, fScissorState); 476 gpu->draw(fInfo, fScissorState);
477 } 477 }
478 478
479 void GrInOrderDrawBuffer::StencilPath::execute(GrGpu* gpu) { 479 void GrInOrderDrawBuffer::StencilPath::execute(GrGpu* gpu) {
480 gpu->onStencilPath(this->path(), fScissorState, fStencilSettings); 480 gpu->stencilPath(this->path(), fScissorState, fStencilSettings);
481 } 481 }
482 482
483 void GrInOrderDrawBuffer::DrawPath::execute(GrGpu* gpu) { 483 void GrInOrderDrawBuffer::DrawPath::execute(GrGpu* gpu) {
484 gpu->onDrawPath(this->path(), fScissorState, fStencilSettings, 484 gpu->drawPath(this->path(), fScissorState, fStencilSettings,
485 fDstCopy.texture() ? &fDstCopy : NULL); 485 fDstCopy.texture() ? &fDstCopy : NULL);
486 } 486 }
487 487
488 void GrInOrderDrawBuffer::DrawPaths::execute(GrGpu* gpu) { 488 void GrInOrderDrawBuffer::DrawPaths::execute(GrGpu* gpu) {
489 gpu->onDrawPaths(this->pathRange(), this->indices(), fCount, this->transform s(), 489 gpu->drawPaths(this->pathRange(), this->indices(), fCount, this->transforms( ),
490 fTransformsType, fScissorState, fStencilSettings, 490 fTransformsType, fScissorState, fStencilSettings,
491 fDstCopy.texture() ? &fDstCopy : NULL); 491 fDstCopy.texture() ? &fDstCopy : NULL);
492 } 492 }
493 493
494 void GrInOrderDrawBuffer::SetState::execute(GrGpu* gpu) { 494 void GrInOrderDrawBuffer::SetState::execute(GrGpu* gpu) {
495 gpu->setDrawState(&fState); 495 gpu->setDrawState(&fState);
496 } 496 }
497 497
498 void GrInOrderDrawBuffer::Clear::execute(GrGpu* gpu) { 498 void GrInOrderDrawBuffer::Clear::execute(GrGpu* gpu) {
499 if (GrColor_ILLEGAL == fColor) { 499 if (GrColor_ILLEGAL == fColor) {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary() { 725 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary() {
726 SkASSERT(!fCmdBuffer.empty()); 726 SkASSERT(!fCmdBuffer.empty());
727 SkASSERT(!cmd_has_trace_marker(fCmdBuffer.back().fType)); 727 SkASSERT(!cmd_has_trace_marker(fCmdBuffer.back().fType));
728 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); 728 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers();
729 if (activeTraceMarkers.count() > 0) { 729 if (activeTraceMarkers.count() > 0) {
730 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType); 730 fCmdBuffer.back().fType = add_trace_bit(fCmdBuffer.back().fType);
731 fGpuCmdMarkers.push_back(activeTraceMarkers); 731 fGpuCmdMarkers.push_back(activeTraceMarkers);
732 } 732 }
733 } 733 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698