OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_OUTPUT_OVERLAY_PROCESSOR_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_PROCESSOR_H_ |
6 #define CC_OUTPUT_OVERLAY_PROCESSOR_H_ | 6 #define CC_OUTPUT_OVERLAY_PROCESSOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 // current set of render passes. Returns true if the strategy was successful | 24 // current set of render passes. Returns true if the strategy was successful |
25 // and adds any additional passes necessary to represent overlays to | 25 // and adds any additional passes necessary to represent overlays to |
26 // |render_passes|. Strategy can also optimize |damage_rect| as it seems | 26 // |render_passes|. Strategy can also optimize |damage_rect| as it seems |
27 // fit to reduce GL composition, in case |damage_rect| is obscured by | 27 // fit to reduce GL composition, in case |damage_rect| is obscured by |
28 // overlays. | 28 // overlays. |
29 virtual bool Attempt(ResourceProvider* resource_provider, | 29 virtual bool Attempt(ResourceProvider* resource_provider, |
30 RenderPassList* render_passes, | 30 RenderPassList* render_passes, |
31 OverlayCandidateList* candidates, | 31 OverlayCandidateList* candidates, |
32 gfx::Rect* damage_rect) = 0; | 32 gfx::Rect* damage_rect) = 0; |
33 }; | 33 }; |
34 typedef ScopedPtrVector<Strategy> StrategyList; | 34 typedef std::vector<scoped_ptr<Strategy>> StrategyList; |
danakj
2015/11/17 01:12:17
<___<... "using" at least
also only used once >_
vmpstr
2015/11/17 23:26:24
There are other uses (it's a public typedef). Swit
| |
35 | 35 |
36 explicit OverlayProcessor(OutputSurface* surface); | 36 explicit OverlayProcessor(OutputSurface* surface); |
37 virtual ~OverlayProcessor(); | 37 virtual ~OverlayProcessor(); |
38 // Virtual to allow testing different strategies. | 38 // Virtual to allow testing different strategies. |
39 virtual void Initialize(); | 39 virtual void Initialize(); |
40 | 40 |
41 void ProcessForOverlays(ResourceProvider* resource_provider, | 41 void ProcessForOverlays(ResourceProvider* resource_provider, |
42 RenderPassList* render_passes, | 42 RenderPassList* render_passes, |
43 OverlayCandidateList* candidates, | 43 OverlayCandidateList* candidates, |
44 gfx::Rect* damage_rect); | 44 gfx::Rect* damage_rect); |
45 | 45 |
46 protected: | 46 protected: |
47 StrategyList strategies_; | 47 StrategyList strategies_; |
48 OutputSurface* surface_; | 48 OutputSurface* surface_; |
49 | 49 |
50 private: | 50 private: |
51 DISALLOW_COPY_AND_ASSIGN(OverlayProcessor); | 51 DISALLOW_COPY_AND_ASSIGN(OverlayProcessor); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace cc | 54 } // namespace cc |
55 | 55 |
56 #endif // CC_OUTPUT_OVERLAY_PROCESSOR_H_ | 56 #endif // CC_OUTPUT_OVERLAY_PROCESSOR_H_ |
OLD | NEW |