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

Unified Diff: dm/DMGpuTask.cpp

Issue 178473006: DM: also run benches once. (Closed) Base URL: https://skia.googlesource.com/skia.git@dm
Patch Set: add note Created 6 years, 10 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/DMGpuTask.h ('k') | dm/DMTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMGpuTask.cpp
diff --git a/dm/DMGpuTask.cpp b/dm/DMGpuTask.cpp
index 3a4708b8db255abe7ea94dae7a5c039039ea050b..c285d88fd708d5f9cb1a916dded79f66cc648f99 100644
--- a/dm/DMGpuTask.cpp
+++ b/dm/DMGpuTask.cpp
@@ -9,20 +9,17 @@
namespace DM {
-GpuTask::GpuTask(const char* name,
+GpuTask::GpuTask(const char* config,
Reporter* reporter,
TaskRunner* taskRunner,
const Expectations& expectations,
skiagm::GMRegistry::Factory gmFactory,
- SkColorType colorType,
GrContextFactory::GLContextType contextType,
int sampleCount)
: Task(reporter, taskRunner)
- , fTaskRunner(taskRunner)
, fGM(gmFactory(NULL))
- , fName(UnderJoin(fGM->shortName(), name))
+ , fName(UnderJoin(fGM->getName(), config))
, fExpectations(expectations)
- , fColorType(colorType)
, fContextType(contextType)
, fSampleCount(sampleCount)
{}
@@ -30,10 +27,10 @@ GpuTask::GpuTask(const char* name,
void GpuTask::draw() {
SkImageInfo info = SkImageInfo::Make(SkScalarCeilToInt(fGM->width()),
SkScalarCeilToInt(fGM->height()),
- fColorType,
+ kPMColor_SkColorType,
kPremul_SkAlphaType);
- GrContext* gr = fTaskRunner->getGrContextFactory()->get(fContextType); // Owned by surface.
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(gr, info, fSampleCount));
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(
+ this->getGrContextFactory()->get(fContextType), info, fSampleCount));
SkCanvas* canvas = surface->getCanvas();
canvas->concat(fGM->getInitialTransform());
« no previous file with comments | « dm/DMGpuTask.h ('k') | dm/DMTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698