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

Side by Side Diff: dm/DMSrcSink.h

Issue 1344993003: Add nanobench tests for BitmapRegionDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/DMSrcSink.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 DMSrcSink_DEFINED 8 #ifndef DMSrcSink_DEFINED
9 #define DMSrcSink_DEFINED 9 #define DMSrcSink_DEFINED
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 kFullImage_Mode, 137 kFullImage_Mode,
138 // Splits the image into multiple regions using a divisor and decodes th e regions 138 // Splits the image into multiple regions using a divisor and decodes th e regions
139 // separately. Also, this test adds a border of a few pixels to each of the regions 139 // separately. Also, this test adds a border of a few pixels to each of the regions
140 // that it is decoding. This tests the behavior when a client asks for a region that 140 // that it is decoding. This tests the behavior when a client asks for a region that
141 // does not fully fit in the image. 141 // does not fully fit in the image.
142 kDivisor_Mode, 142 kDivisor_Mode,
143 }; 143 };
144 144
145 BRDSrc(Path, SkBitmapRegionDecoderInterface::Strategy, Mode, CodecSrc::DstCo lorType, uint32_t); 145 BRDSrc(Path, SkBitmapRegionDecoderInterface::Strategy, Mode, CodecSrc::DstCo lorType, uint32_t);
146 146
147 static float GetScale(uint32_t sampleSize) { return 1.0f / (float) sampleSiz e; }
148
149 Error draw(SkCanvas*) const override; 147 Error draw(SkCanvas*) const override;
150 SkISize size() const override; 148 SkISize size() const override;
151 Name name() const override; 149 Name name() const override;
152 bool veto(SinkFlags) const override; 150 bool veto(SinkFlags) const override;
153 private: 151 private:
154 Path fPath; 152 Path fPath;
155 SkBitmapRegionDecoderInterface::Strategy fStrategy; 153 SkBitmapRegionDecoderInterface::Strategy fStrategy;
156 Mode fMode; 154 Mode fMode;
157 CodecSrc::DstColorType fDstColorType; 155 CodecSrc::DstColorType fDstColorType;
158 uint32_t fSampleSize; 156 uint32_t fSampleSize;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 337
340 class ViaTwice : public Via { 338 class ViaTwice : public Via {
341 public: 339 public:
342 explicit ViaTwice(Sink* sink) : Via(sink) {} 340 explicit ViaTwice(Sink* sink) : Via(sink) {}
343 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; 341 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
344 }; 342 };
345 343
346 } // namespace DM 344 } // namespace DM
347 345
348 #endif//DMSrcSink_DEFINED 346 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698