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

Unified Diff: src/gpu/GrGpu.h

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/GrGeometryProcessor.cpp ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 53ac9c3f91fb0347ba34f38758aac4d118376ab4..5bbc3dcb05884b3e04a10bb1ae31ccfd65f35c0f 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -302,25 +302,12 @@ public:
// is dirty.
ResetTimestamp getResetTimestamp() const { return fResetTimestamp; }
- enum DrawType {
- kDrawPoints_DrawType,
- kDrawLines_DrawType,
- kDrawTriangles_DrawType,
- kDrawPath_DrawType,
- kDrawPaths_DrawType,
- };
-
- static bool IsPathRenderingDrawType(DrawType type) {
- return kDrawPath_DrawType == type || kDrawPaths_DrawType == type;
- }
-
GrContext::GPUStats* gpuStats() { return &fGPUStats; }
virtual void buildProgramDesc(GrProgramDesc*,
const GrPrimitiveProcessor&,
const GrOptDrawState&,
const GrProgramDesc::DescInfo&,
- GrGpu::DrawType,
const GrBatchTracker&) const = 0;
/**
@@ -366,20 +353,17 @@ public:
DrawArgs(const GrPrimitiveProcessor* primProc,
const GrOptDrawState* optState,
const GrProgramDesc* desc,
- const GrBatchTracker* batchTracker,
- DrawType drawType)
+ const GrBatchTracker* batchTracker)
: fPrimitiveProcessor(primProc)
, fOptState(optState)
, fDesc(desc)
- , fBatchTracker(batchTracker)
- , fDrawType(drawType) {
+ , fBatchTracker(batchTracker) {
SkASSERT(primProc && optState && desc && batchTracker);
}
const GrPrimitiveProcessor* fPrimitiveProcessor;
const GrOptDrawState* fOptState;
const GrProgramDesc* fDesc;
const GrBatchTracker* fBatchTracker;
- DrawType fDrawType;
};
void draw(const DrawArgs&, const GrDrawTarget::DrawInfo&);
@@ -405,23 +389,6 @@ public:
int count,
const GrStencilSettings&);
- static DrawType PrimTypeToDrawType(GrPrimitiveType type) {
- switch (type) {
- case kTriangles_GrPrimitiveType:
- case kTriangleStrip_GrPrimitiveType:
- case kTriangleFan_GrPrimitiveType:
- return kDrawTriangles_DrawType;
- case kPoints_GrPrimitiveType:
- return kDrawPoints_DrawType;
- case kLines_GrPrimitiveType:
- case kLineStrip_GrPrimitiveType:
- return kDrawLines_DrawType;
- default:
- SkFAIL("Unexpected primitive type");
- return kDrawTriangles_DrawType;
- }
- }
-
protected:
// Functions used to map clip-respecting stencil tests into normal
// stencil funcs supported by GPUs.
« no previous file with comments | « src/gpu/GrGeometryProcessor.cpp ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698