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

Unified Diff: cc/layers/video_layer_impl.h

Issue 13445009: cc: Move video upload to VideoResourceUpdater. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: consume textures that were produced Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.cc ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_layer_impl.h
diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h
index da1c53f51b99b9d9b06161ada8eb108c8b95b0c7..b272f8f621accb063941e4079aaea26dfa248e12 100644
--- a/cc/layers/video_layer_impl.h
+++ b/cc/layers/video_layer_impl.h
@@ -5,22 +5,16 @@
#ifndef CC_LAYERS_VIDEO_LAYER_IMPL_H_
#define CC_LAYERS_VIDEO_LAYER_IMPL_H_
-#include "base/callback.h"
-#include "base/synchronization/lock.h"
#include "cc/base/cc_export.h"
#include "cc/layers/layer_impl.h"
-#include "cc/layers/video_frame_provider.h"
-#include "media/base/video_frame.h"
-#include "third_party/khronos/GLES2/gl2.h"
-#include "ui/gfx/size.h"
-#include "ui/gfx/transform.h"
+#include "cc/resources/video_resource_updater.h"
namespace media {
-class SkCanvasVideoRenderer;
+class VideoFrame;
}
namespace cc {
-class LayerTreeHostImpl;
+class VideoFrameProvider;
class VideoFrameProviderClientImpl;
class CC_EXPORT VideoLayerImpl : public LayerImpl {
@@ -46,37 +40,23 @@ class CC_EXPORT VideoLayerImpl : public LayerImpl {
void SetProviderClientImpl(
scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl);
- struct FramePlane {
- ResourceProvider::ResourceId resource_id;
- gfx::Size size;
- GLenum format;
-
- FramePlane() : resource_id(0), format(GL_LUMINANCE) {}
-
- bool AllocateData(ResourceProvider* resource_provider);
- void FreeData(ResourceProvider* resource_provider);
- };
-
private:
VideoLayerImpl(LayerTreeImpl* tree_impl, int id);
virtual const char* LayerTypeAsString() const OVERRIDE;
- void WillDrawInternal(ResourceProvider* resource_provider);
- bool SetupFramePlanes(ResourceProvider* resource_provider);
- void FreeFramePlanes(ResourceProvider* resource_provider);
- void FreeUnusedFramePlanes(ResourceProvider* resource_provider);
-
scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_;
scoped_refptr<media::VideoFrame> frame_;
- media::VideoFrame::Format format_;
- bool convert_yuv_;
- ResourceProvider::ResourceId external_texture_resource_;
- scoped_ptr<media::SkCanvasVideoRenderer> video_renderer_;
- // Each index in this array corresponds to a plane in media::VideoFrame.
- FramePlane frame_planes_[media::VideoFrame::kMaxPlanes];
+ scoped_ptr<VideoResourceUpdater> updater_;
+ VideoFrameExternalResources::ResourceType frame_resource_type_;
+ std::vector<ResourceProvider::ResourceId> frame_resources_;
+
+ // TODO(danakj): Remove these, hide software path inside ResourceProvider and
+ // ExternalResource (aka TextureMailbox) classes.
+ std::vector<unsigned> software_resources_;
+ TextureMailbox::ReleaseCallback software_release_callback_;
DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl);
};
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.cc ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698