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

Side by Side Diff: dm/DMGpuTask.cpp

Issue 39743003: DM: print cache stats after every GPU GM when GR_CACHE_STATS is set (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMGpuTask.h" 1 #include "DMGpuTask.h"
2 2
3 #include "DMComparisonTask.h" 3 #include "DMComparisonTask.h"
4 #include "DMUtil.h" 4 #include "DMUtil.h"
5 #include "DMWriteTask.h" 5 #include "DMWriteTask.h"
6 #include "SkCommandLineFlags.h" 6 #include "SkCommandLineFlags.h"
7 #include "SkGpuDevice.h" 7 #include "SkGpuDevice.h"
8 #include "SkTLS.h" 8 #include "SkTLS.h"
9 9
10 namespace DM { 10 namespace DM {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 SkCanvas canvas(&device); 49 SkCanvas canvas(&device);
50 50
51 canvas.concat(fGM->getInitialTransform()); 51 canvas.concat(fGM->getInitialTransform());
52 fGM->draw(&canvas); 52 fGM->draw(&canvas);
53 canvas.flush(); 53 canvas.flush();
54 54
55 SkBitmap bitmap; 55 SkBitmap bitmap;
56 bitmap.setConfig(fConfig, SkScalarCeilToInt(fGM->width()), SkScalarCeilToInt (fGM->height())); 56 bitmap.setConfig(fConfig, SkScalarCeilToInt(fGM->width()), SkScalarCeilToInt (fGM->height()));
57 canvas.readPixels(&bitmap, 0, 0); 57 canvas.readPixels(&bitmap, 0, 0);
58 58
59 #if GR_CACHE_STATS
60 gr->printCacheStats();
61 #endif
62
59 // We offload checksum comparison to the main CPU threadpool. 63 // We offload checksum comparison to the main CPU threadpool.
60 // This cuts run time by about 30%. 64 // This cuts run time by about 30%.
61 this->spawnChild(SkNEW_ARGS(ComparisonTask, (*this, fExpectations, bitmap))) ; 65 this->spawnChild(SkNEW_ARGS(ComparisonTask, (*this, fExpectations, bitmap))) ;
62 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap))); 66 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap)));
63 } 67 }
64 68
65 bool GpuTask::shouldSkip() const { 69 bool GpuTask::shouldSkip() const {
66 return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag); 70 return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag);
67 } 71 }
68 72
69 } // namespace DM 73 } // namespace DM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698