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

Side by Side Diff: Source/platform/graphics/DecodingImageGenerator.h

Issue 609923003: Adding blink side flag that allows disabling YUV decoding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « no previous file | Source/platform/graphics/DecodingImageGenerator.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 (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // 42 //
43 // This class does not own an ImageDecode. It does not own encoded data. It serv es 43 // This class does not own an ImageDecode. It does not own encoded data. It serv es
44 // as and adapter to ImageFrameGenerator which actually performs decoding. 44 // as and adapter to ImageFrameGenerator which actually performs decoding.
45 class DecodingImageGenerator FINAL : public SkImageGenerator { 45 class DecodingImageGenerator FINAL : public SkImageGenerator {
46 public: 46 public:
47 DecodingImageGenerator(PassRefPtr<ImageFrameGenerator>, const SkImageInfo&, size_t index); 47 DecodingImageGenerator(PassRefPtr<ImageFrameGenerator>, const SkImageInfo&, size_t index);
48 virtual ~DecodingImageGenerator(); 48 virtual ~DecodingImageGenerator();
49 49
50 void setGenerationId(size_t id) { m_generationId = id; } 50 void setGenerationId(size_t id) { m_generationId = id; }
51 51
52 static void setYUVDecodingEnabled(bool);
Stephen White 2014/09/26 19:21:14 Since this doesn't really decode YUV at all, let's
53 static bool yuvDecodingEnabled();
54
52 protected: 55 protected:
53 virtual SkData* onRefEncodedData() OVERRIDE; 56 virtual SkData* onRefEncodedData() OVERRIDE;
54 virtual bool onGetInfo(SkImageInfo*) OVERRIDE; 57 virtual bool onGetInfo(SkImageInfo*) OVERRIDE;
55 virtual bool onGetPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) OVERRIDE; 58 virtual bool onGetPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) OVERRIDE;
56 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3], SkYUVColorSpace*) OVERRIDE; 59 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3], SkYUVColorSpace*) OVERRIDE;
57 60
58 private: 61 private:
59 RefPtr<ImageFrameGenerator> m_frameGenerator; 62 RefPtr<ImageFrameGenerator> m_frameGenerator;
60 SkImageInfo m_imageInfo; 63 SkImageInfo m_imageInfo;
61 size_t m_frameIndex; 64 size_t m_frameIndex;
62 size_t m_generationId; 65 size_t m_generationId;
66
67 static bool s_yuvDecodingEnabled;
63 }; 68 };
64 69
65 } // namespace blink 70 } // namespace blink
66 71
67 #endif // DecodingImageGenerator_h_ 72 #endif // DecodingImageGenerator_h_
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/DecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698