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

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 1149773005: Add direct getter for GrCaps to GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init caps in the right place Created 5 years, 7 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/GrDrawTarget.cpp ('k') | src/gpu/GrPathRendererChain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.cpp
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 10633fc340fe5f3ab65ea76cd51cbc344dbbfdf2..491e5cf577766de2a5373e3213b5738fe7c1ea74 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -9,15 +9,14 @@
// We will use the reordering buffer, unless we have NVPR.
// TODO move NVPR to batch so we can reorder
-static inline bool allow_reordering(const GrGpu* gpu) {
- //const GrCaps* caps = gpu->caps();
- //return caps && caps->shaderCaps() && !caps->shaderCaps()->pathRenderingSupport();
+static inline bool allow_reordering(const GrCaps* caps) {
+ //return !caps->shaderCaps()->pathRenderingSupport();
return false;
}
GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrContext* context)
: INHERITED(context)
- , fCommands(GrCommandBuilder::Create(context->getGpu(), allow_reordering(context->getGpu())))
+ , fCommands(GrCommandBuilder::Create(context->getGpu(), allow_reordering(context->caps())))
, fPathIndexBuffer(kPathIdxBufferMinReserve * sizeof(char)/4)
, fPathTransformBuffer(kPathXformBufferMinReserve * sizeof(float)/4)
, fPipelineBuffer(kPipelineBufferMinReserve)
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrPathRendererChain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698