OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_OUTPUT_OVERLAY_PROCESSOR_H_ | |
6 #define CC_OUTPUT_OVERLAY_PROCESSOR_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "cc/base/cc_export.h" | |
11 #include "cc/quads/render_pass.h" | |
12 | |
13 namespace cc { | |
14 class OutputSurface; | |
15 class ResourceProvider; | |
16 | |
17 class CC_EXPORT OverlayProcessor { | |
18 public: | |
19 class Strategy { | |
20 public: | |
21 virtual ~Strategy() {} | |
22 // Returns false if the strategy cannot be made to work with the | |
23 // current set of render passes. Returns true if the strategy was successful | |
24 // and adds any additional passes necessary to represent overlays to | |
25 // |render_passes_in_draw_order|. | |
26 virtual bool Attempt(RenderPassList* render_passes_in_draw_order) = 0; | |
27 }; | |
28 typedef ScopedPtrVector<Strategy> StrategyList; | |
29 | |
30 virtual ~OverlayProcessor(); | |
31 OverlayProcessor(OutputSurface* surface, ResourceProvider* resource_provider); | |
enne (OOO)
2014/03/18 17:35:14
nit: order the ctor before the dtor
| |
32 // Virtual to allow testing different strategies. | |
33 virtual void Initialize(); | |
34 | |
35 void ProcessForOverlays(RenderPassList* render_passes_in_draw_order); | |
36 | |
37 protected: | |
38 StrategyList strategies_; | |
39 OutputSurface* surface_; | |
40 ResourceProvider* resource_provider_; | |
41 | |
42 private: | |
43 DISALLOW_COPY_AND_ASSIGN(OverlayProcessor); | |
44 }; | |
45 | |
46 } // namespace cc | |
47 | |
48 #endif // CC_OUTPUT_OVERLAY_PROCESSOR_H_ | |
OLD | NEW |