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

Side by Side Diff: content/common/gpu/ca_layer_tree_mac.h

Issue 1828523003: Mac: Use AVSampleBufferDisplayLayer for 4:2:0 surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 4 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 | « content/common/BUILD.gn ('k') | content/common/gpu/ca_layer_tree_mac.mm » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CONTENT_COMMON_GPU_CA_LAYER_TREE_MAC_H_ 5 #ifndef CONTENT_COMMON_GPU_CA_LAYER_TREE_MAC_H_
6 #define CONTENT_COMMON_GPU_CA_LAYER_TREE_MAC_H_ 6 #define CONTENT_COMMON_GPU_CA_LAYER_TREE_MAC_H_
7 7
8 #include <IOSurface/IOSurface.h> 8 #include <IOSurface/IOSurface.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 #include <deque> 10 #include <deque>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/mac/scoped_cftyperef.h" 13 #include "base/mac/scoped_cftyperef.h"
14 #include "base/mac/scoped_nsobject.h" 14 #include "base/mac/scoped_nsobject.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
18 #include "ui/gfx/geometry/rect_f.h" 18 #include "ui/gfx/geometry/rect_f.h"
19 #include "ui/gfx/transform.h" 19 #include "ui/gfx/transform.h"
20 20
21 @class AVSampleBufferDisplayLayer;
22
21 namespace content { 23 namespace content {
22 24
23 // The CALayerTree will construct a hierarchy of CALayers from a linear list, 25 // The CALayerTree will construct a hierarchy of CALayers from a linear list,
24 // using the algorithm and structure referenced described in 26 // using the algorithm and structure referenced described in
25 // https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9Hnig QY/edit?usp=sharing 27 // https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9Hnig QY/edit?usp=sharing
26 class CONTENT_EXPORT CALayerTree { 28 class CONTENT_EXPORT CALayerTree {
27 public: 29 public:
28 CALayerTree(); 30 CALayerTree();
29 31
30 // This will remove all CALayers from this tree from their superlayer. 32 // This will remove all CALayers from this tree from their superlayer.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 const base::ScopedCFTypeRef<IOSurfaceRef> io_surface; 169 const base::ScopedCFTypeRef<IOSurfaceRef> io_surface;
168 gfx::RectF contents_rect; 170 gfx::RectF contents_rect;
169 gfx::Rect rect; 171 gfx::Rect rect;
170 unsigned background_color = 0; 172 unsigned background_color = 0;
171 // Note that the CoreAnimation edge antialiasing mask is not the same as 173 // Note that the CoreAnimation edge antialiasing mask is not the same as
172 // the edge antialiasing mask passed to the constructor. 174 // the edge antialiasing mask passed to the constructor.
173 CAEdgeAntialiasingMask ca_edge_aa_mask = 0; 175 CAEdgeAntialiasingMask ca_edge_aa_mask = 0;
174 float opacity = 1; 176 float opacity = 1;
175 base::scoped_nsobject<CALayer> ca_layer; 177 base::scoped_nsobject<CALayer> ca_layer;
176 178
179 // If this layer's contents can be represented as an
180 // AVSampleBufferDisplayLayer, then |ca_layer| will point to |av_layer|.
181 base::scoped_nsobject<AVSampleBufferDisplayLayer> av_layer;
182 bool use_av_layer = false;
183
177 private: 184 private:
178 DISALLOW_COPY_AND_ASSIGN(ContentLayer); 185 DISALLOW_COPY_AND_ASSIGN(ContentLayer);
179 }; 186 };
180 187
181 RootLayer root_layer_; 188 RootLayer root_layer_;
182 float scale_factor_ = 1; 189 float scale_factor_ = 1;
183 bool has_committed_ = false; 190 bool has_committed_ = false;
184 191
185 private: 192 private:
186 DISALLOW_COPY_AND_ASSIGN(CALayerTree); 193 DISALLOW_COPY_AND_ASSIGN(CALayerTree);
187 }; 194 };
188 195
189 } // namespace content 196 } // namespace content
190 197
191 #endif // CONTENT_COMMON_GPU_CA_LAYER_TREE_MAC_H_ 198 #endif // CONTENT_COMMON_GPU_CA_LAYER_TREE_MAC_H_
OLDNEW
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/gpu/ca_layer_tree_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698