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

Unified Diff: dm/DMGpuGMTask.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/DMGpuGMTask.h ('k') | dm/DMGpuSupport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMGpuGMTask.cpp
diff --git a/dm/DMGpuGMTask.cpp b/dm/DMGpuGMTask.cpp
index cffa2291c53f7a6303e7f282a220e6cc4e3b7f71..c4867b6e9ea06948e1b66138926313f45a7131e8 100644
--- a/dm/DMGpuGMTask.cpp
+++ b/dm/DMGpuGMTask.cpp
@@ -29,8 +29,7 @@ void GpuGMTask::draw(GrContextFactory* grFactory) {
SkScalarCeilToInt(fGM->height()),
kPMColor_SkColorType,
kPremul_SkAlphaType);
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(
- grFactory->get(fContextType), info, fSampleCount));
+ SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info, fSampleCount));
SkCanvas* canvas = surface->getCanvas();
canvas->concat(fGM->getInitialTransform());
@@ -41,16 +40,12 @@ void GpuGMTask::draw(GrContextFactory* grFactory) {
bitmap.setConfig(info);
canvas->readPixels(&bitmap, 0, 0);
-#if GR_CACHE_STATS
- gr->printCacheStats();
-#endif
-
this->spawnChild(SkNEW_ARGS(ExpectationsTask, (*this, fExpectations, bitmap)));
this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap)));
}
bool GpuGMTask::shouldSkip() const {
- return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag);
+ return kGPUDisabled || SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag);
}
} // namespace DM
« no previous file with comments | « dm/DMGpuGMTask.h ('k') | dm/DMGpuSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698