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

Unified Diff: src/gpu/GrBufferedDrawTarget.cpp

Issue 1284983002: Remove trace marker support from GrBufferedDrawTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/GrBufferedDrawTarget.h ('k') | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBufferedDrawTarget.cpp
diff --git a/src/gpu/GrBufferedDrawTarget.cpp b/src/gpu/GrBufferedDrawTarget.cpp
index 9ba6d826326ed46c979723601fd9559c50c1d642..793ffd103f473cb9b21b66b974886018ddad7e66 100644
--- a/src/gpu/GrBufferedDrawTarget.cpp
+++ b/src/gpu/GrBufferedDrawTarget.cpp
@@ -27,11 +27,8 @@ GrBufferedDrawTarget::~GrBufferedDrawTarget() {
}
void GrBufferedDrawTarget::onDrawBatch(GrBatch* batch) {
- this->recordTraceMarkersIfNecessary(
- fCommands->recordXferBarrierIfNecessary(*batch->pipeline(), *this->caps()));
-
- GrTargetCommands::Cmd* cmd = fCommands->recordDrawBatch(batch);
- this->recordTraceMarkersIfNecessary(cmd);
+ fCommands->recordXferBarrierIfNecessary(*batch->pipeline(), *this->caps());
+ fCommands->recordDrawBatch(batch);
}
void GrBufferedDrawTarget::onStencilPath(const GrPipelineBuilder& pipelineBuilder,
@@ -39,10 +36,7 @@ void GrBufferedDrawTarget::onStencilPath(const GrPipelineBuilder& pipelineBuilde
const GrPath* path,
const GrScissorState& scissorState,
const GrStencilSettings& stencilSettings) {
- GrTargetCommands::Cmd* cmd = fCommands->recordStencilPath(pipelineBuilder,
- pathProc, path, scissorState,
- stencilSettings);
- this->recordTraceMarkersIfNecessary(cmd);
+ fCommands->recordStencilPath(pipelineBuilder, pathProc, path, scissorState, stencilSettings);
}
void GrBufferedDrawTarget::onDrawPath(const GrPathProcessor* pathProc,
@@ -54,8 +48,7 @@ void GrBufferedDrawTarget::onDrawPath(const GrPathProcessor* pathProc,
if (!state) {
return;
}
- GrTargetCommands::Cmd* cmd = fCommands->recordDrawPath(state, pathProc, path, stencilSettings);
- this->recordTraceMarkersIfNecessary(cmd);
+ fCommands->recordDrawPath(state, pathProc, path, stencilSettings);
}
void GrBufferedDrawTarget::onDrawPaths(const GrPathProcessor* pathProc,
@@ -72,40 +65,33 @@ void GrBufferedDrawTarget::onDrawPaths(const GrPathProcessor* pathProc,
if (!state) {
return;
}
- GrTargetCommands::Cmd* cmd = fCommands->recordDrawPaths(state, this, pathProc, pathRange,
- indices, indexType, transformValues,
- transformType, count,
- stencilSettings, pipelineInfo);
- this->recordTraceMarkersIfNecessary(cmd);
+ fCommands->recordDrawPaths(state, this, pathProc, pathRange, indices, indexType,
+ transformValues, transformType, count, stencilSettings,
+ pipelineInfo);
}
void GrBufferedDrawTarget::onClear(const SkIRect& rect, GrColor color,
GrRenderTarget* renderTarget) {
- GrTargetCommands::Cmd* cmd = fCommands->recordClear(rect, color, renderTarget);
- this->recordTraceMarkersIfNecessary(cmd);
+ fCommands->recordClear(rect, color, renderTarget);
}
void GrBufferedDrawTarget::clearStencilClip(const SkIRect& rect,
bool insideClip,
GrRenderTarget* renderTarget) {
- GrTargetCommands::Cmd* cmd = fCommands->recordClearStencilClip(rect, insideClip, renderTarget);
- this->recordTraceMarkersIfNecessary(cmd);
+ fCommands->recordClearStencilClip(rect, insideClip, renderTarget);
}
void GrBufferedDrawTarget::discard(GrRenderTarget* renderTarget) {
if (!this->caps()->discardRenderTargetSupport()) {
return;
}
-
- GrTargetCommands::Cmd* cmd = fCommands->recordDiscard(renderTarget);
- this->recordTraceMarkersIfNecessary(cmd);
+ fCommands->recordDiscard(renderTarget);
}
void GrBufferedDrawTarget::onReset() {
fCommands->reset();
fPathIndexBuffer.rewind();
fPathTransformBuffer.rewind();
- fGpuCmdMarkers.reset();
fPrevState.reset(NULL);
// Note, fPrevState points into fPipelineBuffer's allocation, so we have to reset first.
@@ -126,23 +112,7 @@ void GrBufferedDrawTarget::onCopySurface(GrSurface* dst,
GrSurface* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint) {
- GrTargetCommands::Cmd* cmd = fCommands->recordCopySurface(dst, src, srcRect, dstPoint);
- this->recordTraceMarkersIfNecessary(cmd);
-}
-
-void GrBufferedDrawTarget::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* cmd) {
- if (!cmd) {
- return;
- }
- const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers();
- if (activeTraceMarkers.count() > 0) {
- if (cmd->isTraced()) {
- fGpuCmdMarkers[cmd->markerID()].addSet(activeTraceMarkers);
- } else {
- cmd->setMarkerID(fGpuCmdMarkers.count());
- fGpuCmdMarkers.push_back(activeTraceMarkers);
- }
- }
+ fCommands->recordCopySurface(dst, src, srcRect, dstPoint);
}
GrTargetCommands::StateForPathDraw*
@@ -167,7 +137,6 @@ GrBufferedDrawTarget::createStateForPathDraw(const GrPrimitiveProcessor* primPro
fPrevState.reset(state);
}
- this->recordTraceMarkersIfNecessary(
- fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps()));
+ fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps());
return fPrevState;
}
« no previous file with comments | « src/gpu/GrBufferedDrawTarget.h ('k') | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698