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

Side by Side Diff: media/base/video_frame_pool.h

Issue 1227383003: Remove memset from VideoFrame and mark buffer as unpoisoned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dalecurtis@ comments. Created 5 years, 5 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
OLDNEW
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 MEDIA_BASE_VIDEO_FRAME_POOL_H_ 5 #ifndef MEDIA_BASE_VIDEO_FRAME_POOL_H_
6 #define MEDIA_BASE_VIDEO_FRAME_POOL_H_ 6 #define MEDIA_BASE_VIDEO_FRAME_POOL_H_
7 7
8 #include "media/base/media_export.h" 8 #include "media/base/media_export.h"
9 #include "media/base/video_frame.h" 9 #include "media/base/video_frame.h"
10 10
(...skipping 12 matching lines...) Expand all
23 VideoFramePool(); 23 VideoFramePool();
24 ~VideoFramePool(); 24 ~VideoFramePool();
25 25
26 // Returns a frame from the pool that matches the specified 26 // Returns a frame from the pool that matches the specified
27 // parameters or creates a new frame if no suitable frame exists in 27 // parameters or creates a new frame if no suitable frame exists in
28 // the pool. 28 // the pool.
29 scoped_refptr<VideoFrame> CreateFrame(VideoFrame::Format format, 29 scoped_refptr<VideoFrame> CreateFrame(VideoFrame::Format format,
30 const gfx::Size& coded_size, 30 const gfx::Size& coded_size,
31 const gfx::Rect& visible_rect, 31 const gfx::Rect& visible_rect,
32 const gfx::Size& natural_size, 32 const gfx::Size& natural_size,
33 base::TimeDelta timestamp); 33 base::TimeDelta timestamp,
34 bool zero_init_new_allocations);
34 35
35 protected: 36 protected:
36 friend class VideoFramePoolTest; 37 friend class VideoFramePoolTest;
37 38
38 // Returns the number of frames in the pool for testing purposes. 39 // Returns the number of frames in the pool for testing purposes.
39 size_t GetPoolSizeForTesting() const; 40 size_t GetPoolSizeForTesting() const;
40 41
41 private: 42 private:
42 class PoolImpl; 43 class PoolImpl;
43 scoped_refptr<PoolImpl> pool_; 44 scoped_refptr<PoolImpl> pool_;
44 45
45 DISALLOW_COPY_AND_ASSIGN(VideoFramePool); 46 DISALLOW_COPY_AND_ASSIGN(VideoFramePool);
46 }; 47 };
47 48
48 } // namespace media 49 } // namespace media
49 50
50 #endif // MEDIA_BASE_VIDEO_FRAME_POOL_H_ 51 #endif // MEDIA_BASE_VIDEO_FRAME_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698