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

Side by Side Diff: cc/layers/video_layer_impl.h

Issue 1039783002: cc: Use const ref to avoid extra ref count of VideoProviderClientImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_LAYERS_VIDEO_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_VIDEO_LAYER_IMPL_H_
6 #define CC_LAYERS_VIDEO_LAYER_IMPL_H_ 6 #define CC_LAYERS_VIDEO_LAYER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 30 matching lines...) Expand all
41 void DidBecomeActive() override; 41 void DidBecomeActive() override;
42 void ReleaseResources() override; 42 void ReleaseResources() override;
43 43
44 void SetNeedsRedraw(); 44 void SetNeedsRedraw();
45 media::VideoRotation video_rotation() const { return video_rotation_; } 45 media::VideoRotation video_rotation() const { return video_rotation_; }
46 46
47 private: 47 private:
48 VideoLayerImpl( 48 VideoLayerImpl(
49 LayerTreeImpl* tree_impl, 49 LayerTreeImpl* tree_impl,
50 int id, 50 int id,
51 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl, 51 const scoped_refptr<VideoFrameProviderClientImpl>& provider_client_impl,
52 media::VideoRotation video_rotation); 52 media::VideoRotation video_rotation);
53 53
54 const char* LayerTypeAsString() const override; 54 const char* LayerTypeAsString() const override;
55 55
56 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_; 56 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl_;
57 57
58 scoped_refptr<media::VideoFrame> frame_; 58 scoped_refptr<media::VideoFrame> frame_;
59 59
60 media::VideoRotation video_rotation_; 60 media::VideoRotation video_rotation_;
61 61
62 scoped_ptr<VideoResourceUpdater> updater_; 62 scoped_ptr<VideoResourceUpdater> updater_;
63 VideoFrameExternalResources::ResourceType frame_resource_type_; 63 VideoFrameExternalResources::ResourceType frame_resource_type_;
64 std::vector<ResourceProvider::ResourceId> frame_resources_; 64 std::vector<ResourceProvider::ResourceId> frame_resources_;
65 65
66 // TODO(danakj): Remove these, hide software path inside ResourceProvider and 66 // TODO(danakj): Remove these, hide software path inside ResourceProvider and
67 // ExternalResource (aka TextureMailbox) classes. 67 // ExternalResource (aka TextureMailbox) classes.
68 std::vector<unsigned> software_resources_; 68 std::vector<unsigned> software_resources_;
69 // Called once for each software resource. 69 // Called once for each software resource.
70 ReleaseCallbackImpl software_release_callback_; 70 ReleaseCallbackImpl software_release_callback_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl); 72 DISALLOW_COPY_AND_ASSIGN(VideoLayerImpl);
73 }; 73 };
74 74
75 } // namespace cc 75 } // namespace cc
76 76
77 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_ 77 #endif // CC_LAYERS_VIDEO_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698