| 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" |
| 11 #include "cc/output/ca_layer_overlay.h" |
| 11 #include "cc/output/overlay_candidate.h" | 12 #include "cc/output/overlay_candidate.h" |
| 12 #include "cc/quads/render_pass.h" | 13 #include "cc/quads/render_pass.h" |
| 13 | 14 |
| 14 namespace cc { | 15 namespace cc { |
| 15 class OutputSurface; | 16 class OutputSurface; |
| 16 class ResourceProvider; | 17 class ResourceProvider; |
| 17 | 18 |
| 18 class CC_EXPORT OverlayProcessor { | 19 class CC_EXPORT OverlayProcessor { |
| 19 public: | 20 public: |
| 20 class CC_EXPORT Strategy { | 21 class CC_EXPORT Strategy { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 31 OverlayCandidateList* candidates, | 32 OverlayCandidateList* candidates, |
| 32 gfx::Rect* damage_rect) = 0; | 33 gfx::Rect* damage_rect) = 0; |
| 33 }; | 34 }; |
| 34 typedef ScopedPtrVector<Strategy> StrategyList; | 35 typedef ScopedPtrVector<Strategy> StrategyList; |
| 35 | 36 |
| 36 explicit OverlayProcessor(OutputSurface* surface); | 37 explicit OverlayProcessor(OutputSurface* surface); |
| 37 virtual ~OverlayProcessor(); | 38 virtual ~OverlayProcessor(); |
| 38 // Virtual to allow testing different strategies. | 39 // Virtual to allow testing different strategies. |
| 39 virtual void Initialize(); | 40 virtual void Initialize(); |
| 40 | 41 |
| 42 bool ProcessForCALayers(ResourceProvider* resource_provider, |
| 43 RenderPassList* render_passes, |
| 44 CALayerOverlayList* ca_layer_overlays, |
| 45 OverlayCandidateList* overlay_candidates); |
| 46 |
| 41 void ProcessForOverlays(ResourceProvider* resource_provider, | 47 void ProcessForOverlays(ResourceProvider* resource_provider, |
| 42 RenderPassList* render_passes, | 48 RenderPassList* render_passes, |
| 43 OverlayCandidateList* candidates, | 49 OverlayCandidateList* candidates, |
| 44 gfx::Rect* damage_rect); | 50 gfx::Rect* damage_rect); |
| 45 | 51 |
| 46 protected: | 52 protected: |
| 47 StrategyList strategies_; | 53 StrategyList strategies_; |
| 48 OutputSurface* surface_; | 54 OutputSurface* surface_; |
| 49 | 55 |
| 50 private: | 56 private: |
| 51 DISALLOW_COPY_AND_ASSIGN(OverlayProcessor); | 57 DISALLOW_COPY_AND_ASSIGN(OverlayProcessor); |
| 52 }; | 58 }; |
| 53 | 59 |
| 54 } // namespace cc | 60 } // namespace cc |
| 55 | 61 |
| 56 #endif // CC_OUTPUT_OVERLAY_PROCESSOR_H_ | 62 #endif // CC_OUTPUT_OVERLAY_PROCESSOR_H_ |
| OLD | NEW |