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

Side by Side Diff: cc/output/overlay_strategy_common.h

Issue 1142343008: cc: Rework overlays to not use the ResourceProvider and pass texture size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests Created 5 years, 6 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_STRATEGY_COMMON_H_ 5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_
6 #define CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ 6 #define CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/output/overlay_candidate.h" 9 #include "cc/output/overlay_candidate.h"
10 #include "cc/output/overlay_processor.h" 10 #include "cc/output/overlay_processor.h"
11 11
12 namespace cc { 12 namespace cc {
13 class OverlayCandidateValidator; 13 class OverlayCandidateValidator;
14 class StreamVideoDrawQuad; 14 class StreamVideoDrawQuad;
15 class TextureDrawQuad; 15 class TextureDrawQuad;
16 class OverlayCandidate; 16 class OverlayCandidate;
17 17
18 class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy { 18 class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy {
19 public: 19 public:
20 OverlayStrategyCommon(OverlayCandidateValidator* capability_checker, 20 OverlayStrategyCommon();
21 ResourceProvider* resource_provider);
22 ~OverlayStrategyCommon() override; 21 ~OverlayStrategyCommon() override;
23 22
24 protected: 23 protected:
25 bool GetCandidateQuadInfo(const DrawQuad& draw_quad, 24 bool GetCandidateQuadInfo(const DrawQuad& draw_quad,
26 OverlayCandidate* quad_info); 25 OverlayCandidate* quad_info);
27 26
28 // Returns true if |draw_quad| will not block quads underneath from becoming 27 // Returns true if |draw_quad| will not block quads underneath from becoming
29 // an overlay. 28 // an overlay.
30 bool IsInvisibleQuad(const DrawQuad* draw_quad); 29 bool IsInvisibleQuad(const DrawQuad* draw_quad);
31 30
32 // Returns true if |draw_quad| is of a known quad type and contains an 31 // Returns true if |draw_quad| is of a known quad type and contains an
33 // overlayable resource. 32 // overlayable resource.
34 bool IsOverlayQuad(const DrawQuad* draw_quad); 33 bool IsOverlayQuad(const DrawQuad* draw_quad);
35 34
36 bool GetTextureQuadInfo(const TextureDrawQuad& quad, 35 bool GetTextureQuadInfo(const TextureDrawQuad& quad,
37 OverlayCandidate* quad_info); 36 OverlayCandidate* quad_info);
38 bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad, 37 bool GetVideoQuadInfo(const StreamVideoDrawQuad& quad,
39 OverlayCandidate* quad_info); 38 OverlayCandidate* quad_info);
40 39
41 OverlayCandidateValidator* capability_checker_;
42 ResourceProvider* resource_provider_;
43
44 private: 40 private:
45 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyCommon); 41 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyCommon);
46 }; 42 };
47 } // namespace cc 43 } // namespace cc
48 44
49 #endif // CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_ 45 #endif // CC_OUTPUT_OVERLAY_STRATEGY_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698