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

Side by Side Diff: components/display_compositor/compositor_overlay_candidate_validator_ozone.h

Issue 2873243002: Move components/display_compositor to components/viz/display_compositor (Closed)
Patch Set: Rebase Created 3 years, 7 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
OLDNEW
(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 COMPONENTS_DISPLAY_COMPOSITOR_COMPOSITOR_OVERLAY_CANDIDATE_VALIDATOR_OZO NE_H_
6 #define COMPONENTS_DISPLAY_COMPOSITOR_COMPOSITOR_OVERLAY_CANDIDATE_VALIDATOR_OZO NE_H_
7
8 #include <memory>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "components/display_compositor/compositor_overlay_candidate_validator.h "
13 #include "components/display_compositor/display_compositor_export.h"
14 #include "ui/gfx/native_widget_types.h"
15
16 namespace ui {
17 class OverlayCandidatesOzone;
18 }
19
20 namespace display_compositor {
21
22 class DISPLAY_COMPOSITOR_EXPORT CompositorOverlayCandidateValidatorOzone
23 : public CompositorOverlayCandidateValidator {
24 public:
25 CompositorOverlayCandidateValidatorOzone(
26 std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates,
27 std::string strategies_string);
28 ~CompositorOverlayCandidateValidatorOzone() override;
29
30 // cc::OverlayCandidateValidator implementation.
31 void GetStrategies(cc::OverlayProcessor::StrategyList* strategies) override;
32 bool AllowCALayerOverlays() override;
33 bool AllowDCLayerOverlays() override;
34 void CheckOverlaySupport(cc::OverlayCandidateList* surfaces) override;
35
36 // CompositorOverlayCandidateValidator implementation.
37 void SetSoftwareMirrorMode(bool enabled) override;
38
39 private:
40 std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates_;
41 // Callback declaration to allocate a new OverlayProcessor::Strategy.
42 using StrategyInstantiator =
43 base::Callback<std::unique_ptr<cc::OverlayProcessor::Strategy>(
44 CompositorOverlayCandidateValidatorOzone*)>;
45 // List callbacks used to instantiate OverlayProcessor::Strategy
46 // as defined by |strategies_string| paramter in the constructor.
47 std::vector<StrategyInstantiator> strategies_instantiators_;
48 bool software_mirror_active_;
49
50 DISALLOW_COPY_AND_ASSIGN(CompositorOverlayCandidateValidatorOzone);
51 };
52
53 } // namespace display_compositor
54
55 #endif // COMPONENTS_DISPLAY_COMPOSITOR_COMPOSITOR_OVERLAY_CANDIDATE_VALIDATOR_ OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698