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

Unified Diff: dm/DMBenchTask.cpp

Issue 213093004: Let DM work without a GPU. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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 | « dm/DM.cpp ('k') | dm/DMGpuGMTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMBenchTask.cpp
diff --git a/dm/DMBenchTask.cpp b/dm/DMBenchTask.cpp
index 30561a407d1d46d98b00dd62798d672e203235b4..c53daf95b49bcfbb570445501eede1ee5fe9a5aa 100644
--- a/dm/DMBenchTask.cpp
+++ b/dm/DMBenchTask.cpp
@@ -49,7 +49,7 @@ bool CpuBenchTask::shouldSkip() const {
}
bool GpuBenchTask::shouldSkip() const {
- return !fBench->isSuitableFor(SkBenchmark::kGPU_Backend);
+ return kGPUDisabled || !fBench->isSuitableFor(SkBenchmark::kGPU_Backend);
}
static void draw_raster(SkBenchmark* bench, SkColorType colorType) {
@@ -75,8 +75,7 @@ void GpuBenchTask::draw(GrContextFactory* grFactory) {
fBench->getSize().y(),
kPMColor_SkColorType,
kPremul_SkAlphaType);
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(
- grFactory->get(fContextType), info, fSampleCount));
+ SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info, fSampleCount));
fBench->preDraw();
fBench->draw(1, surface->getCanvas());
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMGpuGMTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698