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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1158433006: Store context options on caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@onecaps
Patch Set: remove case statement accidentally checked in 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/GrContextFactory.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 2d5d0b8ee6d5397aae26986d418babf27bf33a8e..e5baaa740487eda977cb2f071602c2aef0312a23 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -11,6 +11,7 @@
#include "GrBatch.h"
#include "GrCaps.h"
#include "GrContext.h"
+#include "GrContextOptions.h"
#include "GrPath.h"
#include "GrPipeline.h"
#include "GrMemoryPool.h"
@@ -68,8 +69,8 @@ bool GrDrawTarget::setupDstReadIfNecessary(const GrPipelineBuilder& pipelineBuil
drawBounds->roundOut(&drawIBounds);
if (!copyRect.intersect(drawIBounds)) {
#ifdef SK_DEBUG
- GrContextDebugf(fContext, "Missed an early reject. "
- "Bailing on draw from setupDstReadIfNecessary.\n");
+ GrCapsDebugf(fCaps, "Missed an early reject. "
+ "Bailing on draw from setupDstReadIfNecessary.\n");
#endif
return false;
}
@@ -598,7 +599,7 @@ SkString GrShaderCaps::dump() const {
///////////////////////////////////////////////////////////////////////////////
-GrCaps::GrCaps() {
+GrCaps::GrCaps(const GrContextOptions& options) {
fMipMapSupport = false;
fNPOTTextureTileSupport = false;
fTwoSidedStencilSupport = false;
@@ -621,6 +622,9 @@ GrCaps::GrCaps() {
memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
+
+ fSupressPrints = options.fSuppressPrints;
+ fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedTexture;
}
static SkString map_flags_to_string(uint32_t flags) {
« no previous file with comments | « src/gpu/GrContextFactory.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698