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

Side by Side Diff: bench/DeferredSurfaceCopyBench.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 | « no previous file | bench/benchmain.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 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 #include "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 19 matching lines...) Expand all
30 return fDiscardableContents ? "DeferredSurfaceCopy_discardable" : 30 return fDiscardableContents ? "DeferredSurfaceCopy_discardable" :
31 "DeferredSurfaceCopy_nonDiscardable"; 31 "DeferredSurfaceCopy_nonDiscardable";
32 } 32 }
33 33
34 virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { 34 virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
35 // The canvas is not actually used for this test except to provide 35 // The canvas is not actually used for this test except to provide
36 // configuration information: gpu, multisampling, size, etc? 36 // configuration information: gpu, multisampling, size, etc?
37 SkImageInfo info; 37 SkImageInfo info;
38 info.fWidth = kSurfaceWidth; 38 info.fWidth = kSurfaceWidth;
39 info.fHeight = kSurfaceHeight; 39 info.fHeight = kSurfaceHeight;
40 info.fColorType = kPMColor_SkColorType; 40 info.fColorType = kN32_SkColorType;
41 info.fAlphaType = kPremul_SkAlphaType; 41 info.fAlphaType = kPremul_SkAlphaType;
42 const SkRect fullCanvasRect = SkRect::MakeWH( 42 const SkRect fullCanvasRect = SkRect::MakeWH(
43 SkIntToScalar(kSurfaceWidth), SkIntToScalar(kSurfaceHeight)); 43 SkIntToScalar(kSurfaceWidth), SkIntToScalar(kSurfaceHeight));
44 SkSurface* surface; 44 SkSurface* surface;
45 #if SK_SUPPORT_GPU 45 #if SK_SUPPORT_GPU
46 GrRenderTarget* rt = reinterpret_cast<GrRenderTarget*>( 46 GrRenderTarget* rt = reinterpret_cast<GrRenderTarget*>(
47 canvas->getDevice()->accessRenderTarget()); 47 canvas->getDevice()->accessRenderTarget());
48 if (NULL != rt) { 48 if (NULL != rt) {
49 surface = SkSurface::NewRenderTarget(rt->getContext(), info, rt->num Samples()); 49 surface = SkSurface::NewRenderTarget(rt->getContext(), info, rt->num Samples());
50 } else 50 } else
(...skipping 22 matching lines...) Expand all
73 private: 73 private:
74 bool fDiscardableContents; 74 bool fDiscardableContents;
75 75
76 typedef SkBenchmark INHERITED; 76 typedef SkBenchmark INHERITED;
77 }; 77 };
78 78
79 ////////////////////////////////////////////////////////////////////////////// 79 //////////////////////////////////////////////////////////////////////////////
80 80
81 DEF_BENCH( return new DeferredSurfaceCopyBench(false); ) 81 DEF_BENCH( return new DeferredSurfaceCopyBench(false); )
82 DEF_BENCH( return new DeferredSurfaceCopyBench(true); ) 82 DEF_BENCH( return new DeferredSurfaceCopyBench(true); )
OLDNEW
« no previous file with comments | « no previous file | bench/benchmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698