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

Side by Side Diff: bench/GrMipMapBench.cpp

Issue 2072813002: Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | bench/nanobench.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 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkImage.h" 10 #include "SkImage.h"
(...skipping 19 matching lines...) Expand all
30 30
31 const char* onGetName() override { return fName.c_str(); } 31 const char* onGetName() override { return fName.c_str(); }
32 32
33 void onDraw(int loops, SkCanvas* canvas) override { 33 void onDraw(int loops, SkCanvas* canvas) override {
34 if (!fSurface) { 34 if (!fSurface) {
35 GrContext* context = canvas->getGrContext(); 35 GrContext* context = canvas->getGrContext();
36 if (nullptr == context) { 36 if (nullptr == context) {
37 return; 37 return;
38 } 38 }
39 SkImageInfo info = SkImageInfo::Make(fW, fH, kN32_SkColorType, kPrem ul_SkAlphaType, 39 SkImageInfo info = SkImageInfo::Make(fW, fH, kN32_SkColorType, kPrem ul_SkAlphaType,
40 SkColorSpace::NewNamed(SkColorS pace::kSRGB_Named)); 40 kSRGB_SkColorProfileType);
41 fSurface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, inf o); 41 fSurface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, inf o);
42 } 42 }
43 43
44 // Clear surface once: 44 // Clear surface once:
45 fSurface->getCanvas()->clear(SK_ColorBLACK); 45 fSurface->getCanvas()->clear(SK_ColorBLACK);
46 46
47 SkPaint paint; 47 SkPaint paint;
48 paint.setFilterQuality(kMedium_SkFilterQuality); 48 paint.setFilterQuality(kMedium_SkFilterQuality);
49 49
50 for (int i = 0; i < loops; i++) { 50 for (int i = 0; i < loops; i++) {
(...skipping 18 matching lines...) Expand all
69 69
70 // Build variants that exercise the width and heights being even or odd at each level, as the 70 // Build variants that exercise the width and heights being even or odd at each level, as the
71 // impl specializes on each of these. 71 // impl specializes on each of these.
72 // 72 //
73 DEF_BENCH( return new GrMipMapBench(511, 511); ) 73 DEF_BENCH( return new GrMipMapBench(511, 511); )
74 DEF_BENCH( return new GrMipMapBench(512, 511); ) 74 DEF_BENCH( return new GrMipMapBench(512, 511); )
75 DEF_BENCH( return new GrMipMapBench(511, 512); ) 75 DEF_BENCH( return new GrMipMapBench(511, 512); )
76 DEF_BENCH( return new GrMipMapBench(512, 512); ) 76 DEF_BENCH( return new GrMipMapBench(512, 512); )
77 77
78 #endif 78 #endif
OLDNEW
« no previous file with comments | « no previous file | bench/nanobench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698