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

Side by Side Diff: cc/resources/video_resource_updater.h

Issue 445013002: media: Optimize HW Video to 2D Canvas copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cc unittests Created 6 years, 4 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 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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "cc/resources/release_callback.h" 15 #include "cc/resources/release_callback.h"
16 #include "cc/resources/resource_format.h" 16 #include "cc/resources/resource_format.h"
17 #include "cc/resources/texture_mailbox.h" 17 #include "cc/resources/texture_mailbox.h"
18 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
19 19
20 namespace media { 20 namespace media {
21 class SkCanvasVideoRenderer;
22 class VideoFrame; 21 class VideoFrame;
23 } 22 }
24 23
25 namespace cc { 24 namespace cc {
26 class ContextProvider; 25 class ContextProvider;
27 class ResourceProvider; 26 class ResourceProvider;
27 class SkCanvasVideoRenderer;
28 28
29 class CC_EXPORT VideoFrameExternalResources { 29 class CC_EXPORT VideoFrameExternalResources {
30 public: 30 public:
31 // Specifies what type of data is contained in the mailboxes, as well as how 31 // Specifies what type of data is contained in the mailboxes, as well as how
32 // many mailboxes will be present. 32 // many mailboxes will be present.
33 enum ResourceType { 33 enum ResourceType {
34 NONE, 34 NONE,
35 YUV_RESOURCE, 35 YUV_RESOURCE,
36 RGB_RESOURCE, 36 RGB_RESOURCE,
37 STREAM_TEXTURE_RESOURCE, 37 STREAM_TEXTURE_RESOURCE,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 RecycleResourceData data, 106 RecycleResourceData data,
107 uint32 sync_point, 107 uint32 sync_point,
108 bool lost_resource); 108 bool lost_resource);
109 static void ReturnTexture(base::WeakPtr<VideoResourceUpdater> updater, 109 static void ReturnTexture(base::WeakPtr<VideoResourceUpdater> updater,
110 const scoped_refptr<media::VideoFrame>& video_frame, 110 const scoped_refptr<media::VideoFrame>& video_frame,
111 uint32 sync_point, 111 uint32 sync_point,
112 bool lost_resource); 112 bool lost_resource);
113 113
114 ContextProvider* context_provider_; 114 ContextProvider* context_provider_;
115 ResourceProvider* resource_provider_; 115 ResourceProvider* resource_provider_;
116 scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_; 116 scoped_ptr<SkCanvasVideoRenderer> video_renderer_;
117 117
118 std::vector<unsigned> all_resources_; 118 std::vector<unsigned> all_resources_;
119 std::vector<PlaneResource> recycled_resources_; 119 std::vector<PlaneResource> recycled_resources_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); 121 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater);
122 }; 122 };
123 123
124 } // namespace cc 124 } // namespace cc
125 125
126 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 126 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698