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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 862933005: remove drawtype (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index f489d03334d8f448f8d44246db688ff67cd37576..b28c32e68c7a936144a638e7d58dd5d6d1dae9bb 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1336,7 +1336,7 @@ void GrGLGpu::flushScissor(const GrScissorState& scissorState,
this->disableScissor();
}
-bool GrGLGpu::flushGLState(const DrawArgs& args) {
+bool GrGLGpu::flushGLState(const DrawArgs& args, bool isLineDraw) {
GrXferProcessor::BlendInfo blendInfo;
const GrOptDrawState& optState = *args.fOptState;
args.fOptState->getXferProcessor()->getBlendInfo(&blendInfo);
@@ -1368,8 +1368,7 @@ bool GrGLGpu::flushGLState(const DrawArgs& args) {
GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState.getRenderTarget());
this->flushStencil(optState.getStencil());
this->flushScissor(optState.getScissorState(), glRT->getViewport(), glRT->origin());
- this->flushHWAAState(glRT, optState.isHWAntialiasState(),
- kDrawLines_DrawType == args.fDrawType);
+ this->flushHWAAState(glRT, optState.isHWAntialiasState(), isLineDraw);
// This must come after textures are flushed because a texture may need
// to be msaa-resolved (which will modify bound FBO state).
@@ -1435,9 +1434,8 @@ void GrGLGpu::buildProgramDesc(GrProgramDesc* desc,
const GrPrimitiveProcessor& primProc,
const GrOptDrawState& optState,
const GrProgramDesc::DescInfo& descInfo,
- GrGpu::DrawType drawType,
const GrBatchTracker& batchTracker) const {
- if (!GrGLProgramDescBuilder::Build(desc, primProc, optState, descInfo, drawType, this,
+ if (!GrGLProgramDescBuilder::Build(desc, primProc, optState, descInfo, this,
batchTracker)) {
SkDEBUGFAIL("Failed to generate GL program descriptor");
}
@@ -1827,7 +1825,7 @@ GrGLenum gPrimitiveType2GLMode[] = {
#endif
void GrGLGpu::onDraw(const DrawArgs& args, const GrDrawTarget::DrawInfo& info) {
- if (!this->flushGLState(args)) {
+ if (!this->flushGLState(args, GrIsPrimTypeLines(info.primitiveType()))) {
return;
}
@@ -1880,7 +1878,7 @@ void GrGLGpu::onStencilPath(const GrPath* path, const StencilPathState& state) {
void GrGLGpu::onDrawPath(const DrawArgs& args, const GrPath* path,
const GrStencilSettings& stencil) {
- if (!this->flushGLState(args)) {
+ if (!this->flushGLState(args, false)) {
return;
}
fPathRendering->drawPath(path, stencil);
@@ -1894,7 +1892,7 @@ void GrGLGpu::onDrawPaths(const DrawArgs& args,
GrDrawTarget::PathTransformType transformType,
int count,
const GrStencilSettings& stencil) {
- if (!this->flushGLState(args)) {
+ if (!this->flushGLState(args, false)) {
return;
}
fPathRendering->drawPaths(pathRange, indices, indexType, transformValues,
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698