aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-05-11 10:14:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-11 14:47:27 +0000
commitc7fe0f708ccbf12bf2ad1374ff307940d2c93880 (patch)
treecc4e63c994ac6af6ddab2f0fa063dbf800e2dd8a /tools/skpbench
parent244f754cdd6ba1c5917a65cd94fe0bf87e3a7339 (diff)
Make GrCaps and GrShaderCaps private.
Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tools/skpbench')
-rw-r--r--tools/skpbench/skpbench.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/skpbench/skpbench.cpp b/tools/skpbench/skpbench.cpp
index 92a642af1c..452095fe06 100644
--- a/tools/skpbench/skpbench.cpp
+++ b/tools/skpbench/skpbench.cpp
@@ -5,13 +5,20 @@
* found in the LICENSE file.
*/
+#include <stdlib.h>
+#include <algorithm>
+#include <array>
+#include <chrono>
+#include <cmath>
+#include <vector>
#include "GpuTimer.h"
+#include "GrCaps.h"
#include "GrContextFactory.h"
-#include "SkGr.h"
-
+#include "GrContextPriv.h"
#include "SkCanvas.h"
#include "SkCommonFlags.h"
#include "SkCommonFlagsGpu.h"
+#include "SkGr.h"
#include "SkOSFile.h"
#include "SkOSPath.h"
#include "SkPerlinNoiseShader.h"
@@ -20,16 +27,10 @@
#include "SkStream.h"
#include "SkSurface.h"
#include "SkSurfaceProps.h"
-#include "picture_utils.h"
-#include "sk_tool_utils.h"
#include "flags/SkCommandLineFlags.h"
#include "flags/SkCommonFlagsConfig.h"
-#include <stdlib.h>
-#include <algorithm>
-#include <array>
-#include <chrono>
-#include <cmath>
-#include <vector>
+#include "picture_utils.h"
+#include "sk_tool_utils.h"
/**
* This is a minimalist program whose sole purpose is to open an skp file, benchmark it on a single
@@ -290,19 +291,18 @@ int main(int argc, char** argv) {
exitf(ExitErr::kUnavailable, "failed to create context for config %s",
config->getTag().c_str());
}
- if (ctx->caps()->maxRenderTargetSize() < SkTMax(width, height)) {
+ if (ctx->maxRenderTargetSize() < SkTMax(width, height)) {
exitf(ExitErr::kUnavailable, "render target size %ix%i not supported by platform (max: %i)",
- width, height, ctx->caps()->maxRenderTargetSize());
+ width, height, ctx->maxRenderTargetSize());
}
- GrPixelConfig grPixConfig = SkImageInfo2GrPixelConfig(config->getColorType(),
- config->getColorSpace(),
- *ctx->caps());
+ GrPixelConfig grPixConfig = SkImageInfo2GrPixelConfig(
+ config->getColorType(), config->getColorSpace(), *ctx->contextPriv().caps());
if (kUnknown_GrPixelConfig == grPixConfig) {
exitf(ExitErr::kUnavailable, "failed to get GrPixelConfig from SkColorType: %d",
config->getColorType());
}
- int supportedSampleCount =
- ctx->caps()->getRenderTargetSampleCount(config->getSamples(), grPixConfig);
+ int supportedSampleCount = ctx->contextPriv().caps()->getRenderTargetSampleCount(
+ config->getSamples(), grPixConfig);
if (supportedSampleCount != config->getSamples()) {
exitf(ExitErr::kUnavailable, "sample count %i not supported by platform",
config->getSamples());