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

Side by Side Diff: dm/DMPipeTask.cpp

Issue 563723005: Add --matrix to DM, to play around with and maybe use on a bot. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « dm/DMPDFTask.cpp ('k') | dm/DMUtil.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMPipeTask.h" 1 #include "DMPipeTask.h"
2 #include "DMUtil.h" 2 #include "DMUtil.h"
3 #include "DMWriteTask.h" 3 #include "DMWriteTask.h"
4 4
5 #include "SamplePipeControllers.h" 5 #include "SamplePipeControllers.h"
6 #include "SkCommandLineFlags.h" 6 #include "SkCommandLineFlags.h"
7 #include "SkGPipe.h" 7 #include "SkGPipe.h"
8 8
9 DEFINE_bool(pipe, true, "If true, check several pipe variants against the refere nce bitmap."); 9 DEFINE_bool(pipe, true, "If true, check several pipe variants against the refere nce bitmap.");
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 AllocatePixels(fReference, &bitmap); 48 AllocatePixels(fReference, &bitmap);
49 49
50 SkCanvas canvas(bitmap); 50 SkCanvas canvas(bitmap);
51 PipeController pipeController(&canvas, &SkImageDecoder::DecodeMemory); 51 PipeController pipeController(&canvas, &SkImageDecoder::DecodeMemory);
52 SkGPipeWriter writer; 52 SkGPipeWriter writer;
53 53
54 SkCanvas* pipeCanvas = writer.startRecording(&pipeController, 54 SkCanvas* pipeCanvas = writer.startRecording(&pipeController,
55 fFlags, 55 fFlags,
56 bitmap.width(), 56 bitmap.width(),
57 bitmap.height()); 57 bitmap.height());
58 CanvasPreflight(pipeCanvas);
58 pipeCanvas->concat(fGM->getInitialTransform()); 59 pipeCanvas->concat(fGM->getInitialTransform());
59 fGM->draw(pipeCanvas); 60 fGM->draw(pipeCanvas);
60 writer.endRecording(); 61 writer.endRecording();
61 62
62 if (!BitmapsEqual(bitmap, fReference)) { 63 if (!BitmapsEqual(bitmap, fReference)) {
63 this->fail(); 64 this->fail();
64 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, "GM", bitmap))); 65 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, "GM", bitmap)));
65 } 66 }
66 } 67 }
67 68
68 bool PipeTask::shouldSkip() const { 69 bool PipeTask::shouldSkip() const {
69 if (!FLAGS_pipe) { 70 if (!FLAGS_pipe) {
70 return true; 71 return true;
71 } 72 }
72 if (fGM->getFlags() & skiagm::GM::kSkipPipe_Flag) { 73 if (fGM->getFlags() & skiagm::GM::kSkipPipe_Flag) {
73 return true; 74 return true;
74 } 75 }
75 if (fFlags == SkGPipeWriter::kCrossProcess_Flag && 76 if (fFlags == SkGPipeWriter::kCrossProcess_Flag &&
76 fGM->getFlags() & skiagm::GM::kSkipPipeCrossProcess_Flag) { 77 fGM->getFlags() & skiagm::GM::kSkipPipeCrossProcess_Flag) {
77 return true; 78 return true;
78 } 79 }
79 return false; 80 return false;
80 } 81 }
81 82
82 } // namespace DM 83 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMPDFTask.cpp ('k') | dm/DMUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698