aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2014-10-31 12:20:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-31 12:20:08 -0700
commitb9e8230b50fc383869ee64208e23e5b6403568a1 (patch)
tree4e06c4d27bfd045a5736a728e6eeb6a24e55bb76 /include/gpu
parent7a75e5230872732e71ea99058d9afe5d4b6758b0 (diff)
Revert of GrContext no longer ever draws on Gpu (patchset #7 id:120001 of https://codereview.chromium.org/683733005/)
Reason for revert: breaks some android bots Original issue's description: > GrContext no longer ever draws on Gpu > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/7a75e5230872732e71ea99058d9afe5d4b6758b0 TBR=bsalomon@google.com,joshualitt@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/694983002
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrContext.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 001ba88027..08a04fbd93 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -941,6 +941,13 @@ public:
#endif
private:
+ // Used to indicate whether a draw should be performed immediately or queued in fDrawBuffer.
+ enum BufferedDraw {
+ kYes_BufferedDraw,
+ kNo_BufferedDraw,
+ };
+ BufferedDraw fLastDrawWasBuffered;
+
GrGpu* fGpu;
SkMatrix fViewMatrix;
SkAutoTUnref<GrRenderTarget> fRenderTarget;
@@ -989,7 +996,7 @@ private:
class AutoCheckFlush;
/// Sets the paint and returns the target to draw into. The paint can be NULL in which case the
/// draw state is left unmodified.
- GrDrawTarget* prepareToDraw(const GrPaint*, AutoRestoreEffects*, AutoCheckFlush*);
+ GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects*, AutoCheckFlush*);
void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path,
const GrStrokeInfo& stroke);