ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / cc / output / overlay_strategy_single_on_top.h
bloba3fec0a66e38a4d9019ab193c7eb445bcee7170f
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.
5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
6 #define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h"
11 #include "cc/output/overlay_candidate.h"
12 #include "cc/output/overlay_processor.h"
13 #include "cc/quads/render_pass.h"
15 namespace cc {
16 class OverlayCandidateValidator;
17 class StreamVideoDrawQuad;
18 class TextureDrawQuad;
20 class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy {
21 public:
22 OverlayStrategySingleOnTop(OverlayCandidateValidator* capability_checker,
23 ResourceProvider* resource_provider);
24 bool Attempt(RenderPassList* render_passes_in_draw_order,
25 OverlayCandidateList* candidate_list) override;
27 private:
28 bool IsOverlayQuad(const DrawQuad* draw_quad);
29 bool GetCandidateQuadInfo(const DrawQuad& draw_quad,
30 OverlayCandidate* quad_info);
32 // Returns true if |draw_quad| will not block quads underneath from becoming
33 // an overlay.
34 bool IsInvisibleQuad(const DrawQuad* draw_quad);
36 bool GetTextureQuadInfo(const TextureDrawQuad& quad,
37 OverlayCandidate* quad_info);
38 bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad,
39 OverlayCandidate* quad_info);
41 OverlayCandidateValidator* capability_checker_;
42 ResourceProvider* resource_provider_;
43 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop);
46 } // namespace cc
48 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_