aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrInOrderDrawBuffer.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2015-05-04 07:51:09 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-04 07:51:09 -0700
commitedae3096afe674efce917825f8d44726037405eb (patch)
tree69fddf021a1d08e5a8283cd56c7142d970a09973 /src/gpu/GrInOrderDrawBuffer.h
parent5d6bb6f795143ca360b868560b52165de51fa269 (diff)
Revert of Move state management to GrInOrderDrawBuffer (patchset #4 id:60001 of https://codereview.chromium.org/1120143002/)
Reason for revert: Breaks windows Original issue's description: > Move state management to GrInOrderDrawBuffer > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/5d6bb6f795143ca360b868560b52165de51fa269 TBR=bsalomon@google.com,robertphillips@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1119353002
Diffstat (limited to 'src/gpu/GrInOrderDrawBuffer.h')
-rw-r--r--src/gpu/GrInOrderDrawBuffer.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index b253768f84..ce82c889a7 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -72,17 +72,6 @@ protected:
private:
friend class GrTargetCommands;
- typedef GrTargetCommands::State State;
-
- State* allocState(const GrPrimitiveProcessor* primProc = NULL) {
- void* allocation = fPipelineBuffer.alloc(sizeof(State), SkChunkAlloc::kThrow_AllocFailType);
- return SkNEW_PLACEMENT_ARGS(allocation, State, (primProc));
- }
-
- void unallocState(State* state) {
- state->unref();
- fPipelineBuffer.unalloc(state);
- }
void onReset() override;
void onFlush() override;
@@ -95,6 +84,7 @@ private:
const SkRect& rect,
const SkRect* localRect,
const SkMatrix* localMatrix) override;
+
void onStencilPath(const GrPipelineBuilder&,
const GrPathProcessor*,
const GrPath*,
@@ -132,29 +122,17 @@ private:
}
bool isIssued(uint32_t drawID) override { return drawID != fDrawID; }
- State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(const GrPrimitiveProcessor*,
- const GrDrawTarget::PipelineInfo&);
- State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(GrBatch*,
- const GrDrawTarget::PipelineInfo&);
-
// TODO: Use a single allocator for commands and records
enum {
kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's
kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms
- kPipelineBufferMinReserve = 32 * sizeof(State),
};
- // every 100 flushes we should reset our fPipelineBuffer to prevent us from holding at a
- // highwater mark
- static const int kPipelineBufferHighWaterMark = 100;
-
GrTargetCommands fCommands;
SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
SkChunkAlloc fPathIndexBuffer;
SkChunkAlloc fPathTransformBuffer;
- SkChunkAlloc fPipelineBuffer;
uint32_t fDrawID;
- SkAutoTUnref<State> fPrevState;
typedef GrClipTarget INHERITED;
};