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

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

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/overlay_processor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 14 matching lines...) Expand all
25 // current set of render passes. Returns true if the strategy was successful 25 // current set of render passes. Returns true if the strategy was successful
26 // and adds any additional passes necessary to represent overlays to 26 // and adds any additional passes necessary to represent overlays to
27 // |render_passes|. Strategy can also optimize |damage_rect| as it seems 27 // |render_passes|. Strategy can also optimize |damage_rect| as it seems
28 // fit to reduce GL composition, in case |damage_rect| is obscured by 28 // fit to reduce GL composition, in case |damage_rect| is obscured by
29 // overlays. 29 // overlays.
30 virtual bool Attempt(ResourceProvider* resource_provider, 30 virtual bool Attempt(ResourceProvider* resource_provider,
31 RenderPassList* render_passes, 31 RenderPassList* render_passes,
32 OverlayCandidateList* candidates, 32 OverlayCandidateList* candidates,
33 gfx::Rect* damage_rect) = 0; 33 gfx::Rect* damage_rect) = 0;
34 }; 34 };
35 typedef ScopedPtrVector<Strategy> StrategyList; 35 using StrategyList = std::vector<scoped_ptr<Strategy>>;
36 36
37 explicit OverlayProcessor(OutputSurface* surface); 37 explicit OverlayProcessor(OutputSurface* surface);
38 virtual ~OverlayProcessor(); 38 virtual ~OverlayProcessor();
39 // Virtual to allow testing different strategies. 39 // Virtual to allow testing different strategies.
40 virtual void Initialize(); 40 virtual void Initialize();
41 41
42 bool ProcessForCALayers(ResourceProvider* resource_provider, 42 bool ProcessForCALayers(ResourceProvider* resource_provider,
43 RenderPassList* render_passes, 43 RenderPassList* render_passes,
44 CALayerOverlayList* ca_layer_overlays, 44 CALayerOverlayList* ca_layer_overlays,
45 OverlayCandidateList* overlay_candidates); 45 OverlayCandidateList* overlay_candidates);
46 46
47 void ProcessForOverlays(ResourceProvider* resource_provider, 47 void ProcessForOverlays(ResourceProvider* resource_provider,
48 RenderPassList* render_passes, 48 RenderPassList* render_passes,
49 OverlayCandidateList* candidates, 49 OverlayCandidateList* candidates,
50 gfx::Rect* damage_rect); 50 gfx::Rect* damage_rect);
51 51
52 protected: 52 protected:
53 StrategyList strategies_; 53 StrategyList strategies_;
54 OutputSurface* surface_; 54 OutputSurface* surface_;
55 55
56 private: 56 private:
57 DISALLOW_COPY_AND_ASSIGN(OverlayProcessor); 57 DISALLOW_COPY_AND_ASSIGN(OverlayProcessor);
58 }; 58 };
59 59
60 } // namespace cc 60 } // namespace cc
61 61
62 #endif // CC_OUTPUT_OVERLAY_PROCESSOR_H_ 62 #endif // CC_OUTPUT_OVERLAY_PROCESSOR_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/overlay_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698