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

Side by Side Diff: dm/DMBenchTask.cpp

Issue 227433009: Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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/DM.cpp ('k') | dm/DMGpuGMTask.cpp » ('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 "DMBenchTask.h" 1 #include "DMBenchTask.h"
2 #include "DMUtil.h" 2 #include "DMUtil.h"
3 #include "SkSurface.h" 3 #include "SkSurface.h"
4 4
5 namespace DM { 5 namespace DM {
6 6
7 static SkString bench_name(const char* name, const char* config) { 7 static SkString bench_name(const char* name, const char* config) {
8 SkString result("bench "); 8 SkString result("bench ");
9 result.appendf("%s_%s", name, config); 9 result.appendf("%s_%s", name, config);
10 return result; 10 return result;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 SkBitmap bitmap; 56 SkBitmap bitmap;
57 SetupBitmap(colorType, bench, &bitmap); 57 SetupBitmap(colorType, bench, &bitmap);
58 SkCanvas canvas(bitmap); 58 SkCanvas canvas(bitmap);
59 59
60 bench->preDraw(); 60 bench->preDraw();
61 bench->draw(1, &canvas); 61 bench->draw(1, &canvas);
62 bench->postDraw(); 62 bench->postDraw();
63 } 63 }
64 64
65 void NonRenderingBenchTask::draw() { 65 void NonRenderingBenchTask::draw() {
66 draw_raster(fBench.get(), kPMColor_SkColorType); 66 draw_raster(fBench.get(), kN32_SkColorType);
67 } 67 }
68 68
69 void CpuBenchTask::draw() { 69 void CpuBenchTask::draw() {
70 draw_raster(fBench.get(), fColorType); 70 draw_raster(fBench.get(), fColorType);
71 } 71 }
72 72
73 void GpuBenchTask::draw(GrContextFactory* grFactory) { 73 void GpuBenchTask::draw(GrContextFactory* grFactory) {
74 SkImageInfo info = SkImageInfo::Make(fBench->getSize().x(), 74 SkImageInfo info = SkImageInfo::Make(fBench->getSize().x(),
75 fBench->getSize().y(), 75 fBench->getSize().y(),
76 kPMColor_SkColorType, 76 kN32_SkColorType,
77 kPremul_SkAlphaType); 77 kPremul_SkAlphaType);
78 SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info, fSampleCount)); 78 SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info, fSampleCount));
79 79
80 fBench->preDraw(); 80 fBench->preDraw();
81 fBench->draw(1, surface->getCanvas()); 81 fBench->draw(1, surface->getCanvas());
82 fBench->postDraw(); 82 fBench->postDraw();
83 } 83 }
84 84
85 } // namespace DM 85 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMGpuGMTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698