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

Side by Side Diff: tools/VisualBench/WrappedBenchmark.h

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome Created 4 years, 9 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 | « tests/WritePixelsTest.cpp ('k') | tools/kilobench/kilobench.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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #ifndef WrappedBenchmark_DEFINED 8 #ifndef WrappedBenchmark_DEFINED
9 #define WrappedBenchmark_DEFINED 9 #define WrappedBenchmark_DEFINED
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 class GpuWrappedBenchmark : public WrappedBenchmark { 98 class GpuWrappedBenchmark : public WrappedBenchmark {
99 public: 99 public:
100 explicit GpuWrappedBenchmark(const SkSurfaceProps& surfaceProps, Benchmark* bench, 100 explicit GpuWrappedBenchmark(const SkSurfaceProps& surfaceProps, Benchmark* bench,
101 int numSamples) 101 int numSamples)
102 : INHERITED(surfaceProps, bench) 102 : INHERITED(surfaceProps, bench)
103 , fNumSamples(numSamples) {} 103 , fNumSamples(numSamples) {}
104 104
105 private: 105 private:
106 void setupOffScreen(SkCanvas* canvas) override { 106 void setupOffScreen(SkCanvas* canvas) override {
107 fOffScreen.reset(SkSurface::NewRenderTarget(canvas->getGrContext(), 107 fOffScreen.reset(SkSurface::NewRenderTarget(canvas->getGrContext(),
108 SkSurface::kNo_Budgeted, 108 SkBudgeted::kNo,
109 canvas->imageInfo(), 109 canvas->imageInfo(),
110 fNumSamples, 110 fNumSamples,
111 &this->surfaceProps())); 111 &this->surfaceProps()));
112 } 112 }
113 113
114 void onBlitToScreen(SkCanvas* canvas, int w, int h) override { 114 void onBlitToScreen(SkCanvas* canvas, int w, int h) override {
115 // We call copySurface directly on the underlying GPU surfaces for a mor e efficient blit. 115 // We call copySurface directly on the underlying GPU surfaces for a mor e efficient blit.
116 GrRenderTarget* dst, *src; 116 GrRenderTarget* dst, *src;
117 117
118 SkCanvas::LayerIter canvasIter(canvas, false); 118 SkCanvas::LayerIter canvasIter(canvas, false);
(...skipping 14 matching lines...) Expand all
133 offscreenIter.next(); 133 offscreenIter.next();
134 SkASSERT(offscreenIter.done()); 134 SkASSERT(offscreenIter.done());
135 #endif 135 #endif
136 } 136 }
137 137
138 int fNumSamples; 138 int fNumSamples;
139 typedef WrappedBenchmark INHERITED; 139 typedef WrappedBenchmark INHERITED;
140 }; 140 };
141 141
142 #endif //WrappedBenchmark_DEFINED 142 #endif //WrappedBenchmark_DEFINED
OLDNEW
« no previous file with comments | « tests/WritePixelsTest.cpp ('k') | tools/kilobench/kilobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698