Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 5 #ifndef CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| 6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 class CC_EXPORT VideoResourceUpdater | 73 class CC_EXPORT VideoResourceUpdater |
| 74 : public base::SupportsWeakPtr<VideoResourceUpdater> { | 74 : public base::SupportsWeakPtr<VideoResourceUpdater> { |
| 75 public: | 75 public: |
| 76 VideoResourceUpdater(ContextProvider* context_provider, | 76 VideoResourceUpdater(ContextProvider* context_provider, |
| 77 ResourceProvider* resource_provider); | 77 ResourceProvider* resource_provider); |
| 78 ~VideoResourceUpdater(); | 78 ~VideoResourceUpdater(); |
| 79 | 79 |
| 80 VideoFrameExternalResources CreateExternalResourcesFromVideoFrame( | 80 VideoFrameExternalResources CreateExternalResourcesFromVideoFrame( |
| 81 scoped_refptr<media::VideoFrame> video_frame); | 81 scoped_refptr<media::VideoFrame> video_frame); |
| 82 | 82 |
| 83 // Public for testing only. | |
| 84 static void MakeHalfFloats(const uint16_t* src, | |
|
danakj
2016/09/26 20:35:04
There are 4 parameters, all are shortened names, a
hubbe
2016/09/26 21:19:36
Comment added.
| |
| 85 float mult, | |
| 86 size_t num, | |
| 87 uint16_t* dst); | |
| 88 | |
| 83 private: | 89 private: |
| 84 class PlaneResource { | 90 class PlaneResource { |
| 85 public: | 91 public: |
| 86 PlaneResource(unsigned resource_id, | 92 PlaneResource(unsigned resource_id, |
| 87 const gfx::Size& resource_size, | 93 const gfx::Size& resource_size, |
| 88 ResourceFormat resource_format, | 94 ResourceFormat resource_format, |
| 89 gpu::Mailbox mailbox); | 95 gpu::Mailbox mailbox); |
| 90 PlaneResource(const PlaneResource& other); | 96 PlaneResource(const PlaneResource& other); |
| 91 | 97 |
| 92 // Returns true if this resource matches the unique identifiers of another | 98 // Returns true if this resource matches the unique identifiers of another |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 // Recycle resources so that we can reduce the number of allocations and | 186 // Recycle resources so that we can reduce the number of allocations and |
| 181 // data transfers. | 187 // data transfers. |
| 182 ResourceList all_resources_; | 188 ResourceList all_resources_; |
| 183 | 189 |
| 184 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); | 190 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); |
| 185 }; | 191 }; |
| 186 | 192 |
| 187 } // namespace cc | 193 } // namespace cc |
| 188 | 194 |
| 189 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ | 195 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ |
| OLD | NEW |