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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 897783002: Update {virtual,override,final} to follow C++11 style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/cancelable_callback.h" 9 #include "base/cancelable_callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 26 matching lines...) Expand all
37 // ----------------------------------------------------------------------------- 37 // -----------------------------------------------------------------------------
38 // Browser-side compositor that manages a tree of content and UI layers. 38 // Browser-side compositor that manages a tree of content and UI layers.
39 // ----------------------------------------------------------------------------- 39 // -----------------------------------------------------------------------------
40 class CONTENT_EXPORT CompositorImpl 40 class CONTENT_EXPORT CompositorImpl
41 : public Compositor, 41 : public Compositor,
42 public cc::LayerTreeHostClient, 42 public cc::LayerTreeHostClient,
43 public cc::LayerTreeHostSingleThreadClient, 43 public cc::LayerTreeHostSingleThreadClient,
44 public ui::WindowAndroidCompositor { 44 public ui::WindowAndroidCompositor {
45 public: 45 public:
46 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); 46 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window);
47 virtual ~CompositorImpl(); 47 ~CompositorImpl() override;
48 48
49 static bool IsInitialized(); 49 static bool IsInitialized();
50 50
51 void PopulateGpuCapabilities(gpu::Capabilities gpu_capabilities); 51 void PopulateGpuCapabilities(gpu::Capabilities gpu_capabilities);
52 52
53 private: 53 private:
54 // Compositor implementation. 54 // Compositor implementation.
55 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) override; 55 void SetRootLayer(scoped_refptr<cc::Layer> root) override;
56 virtual void SetSurface(jobject surface) override; 56 void SetSurface(jobject surface) override;
57 virtual void SetVisible(bool visible) override; 57 void SetVisible(bool visible) override;
58 virtual void setDeviceScaleFactor(float factor) override; 58 void setDeviceScaleFactor(float factor) override;
59 virtual void SetWindowBounds(const gfx::Size& size) override; 59 void SetWindowBounds(const gfx::Size& size) override;
60 virtual void SetHasTransparentBackground(bool flag) override; 60 void SetHasTransparentBackground(bool flag) override;
61 virtual void SetNeedsComposite() override; 61 void SetNeedsComposite() override;
62 virtual ui::UIResourceProvider& GetUIResourceProvider() override; 62 ui::UIResourceProvider& GetUIResourceProvider() override;
63 virtual ui::ResourceManager& GetResourceManager() override; 63 ui::ResourceManager& GetResourceManager() override;
64 64
65 // LayerTreeHostClient implementation. 65 // LayerTreeHostClient implementation.
66 virtual void WillBeginMainFrame(int frame_id) override {} 66 void WillBeginMainFrame(int frame_id) override {}
67 virtual void DidBeginMainFrame() override {} 67 void DidBeginMainFrame() override {}
68 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) override {} 68 void BeginMainFrame(const cc::BeginFrameArgs& args) override {}
69 virtual void Layout() override; 69 void Layout() override;
70 virtual void ApplyViewportDeltas( 70 void ApplyViewportDeltas(const gfx::Vector2d& inner_delta,
71 const gfx::Vector2d& inner_delta, 71 const gfx::Vector2d& outer_delta,
72 const gfx::Vector2d& outer_delta, 72 const gfx::Vector2dF& elastic_overscroll_delta,
73 const gfx::Vector2dF& elastic_overscroll_delta, 73 float page_scale,
74 float page_scale, 74 float top_controls_delta) override {}
75 float top_controls_delta) override {} 75 void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
76 virtual void ApplyViewportDeltas( 76 float page_scale,
77 const gfx::Vector2d& scroll_delta, 77 float top_controls_delta) override {}
78 float page_scale, 78 void RequestNewOutputSurface() override;
79 float top_controls_delta) override {} 79 void DidInitializeOutputSurface() override {}
80 virtual void RequestNewOutputSurface() override; 80 void DidFailToInitializeOutputSurface() override;
81 virtual void DidInitializeOutputSurface() override {} 81 void WillCommit() override {}
82 virtual void DidFailToInitializeOutputSurface() override; 82 void DidCommit() override;
83 virtual void WillCommit() override {} 83 void DidCommitAndDrawFrame() override {}
84 virtual void DidCommit() override; 84 void DidCompleteSwapBuffers() override;
85 virtual void DidCommitAndDrawFrame() override {} 85 void DidCompletePageScaleAnimation() override {}
86 virtual void DidCompleteSwapBuffers() override;
87 virtual void DidCompletePageScaleAnimation() override {}
88 86
89 // LayerTreeHostSingleThreadClient implementation. 87 // LayerTreeHostSingleThreadClient implementation.
90 virtual void ScheduleComposite() override; 88 void ScheduleComposite() override;
91 virtual void ScheduleAnimation() override; 89 void ScheduleAnimation() override;
92 virtual void DidPostSwapBuffers() override; 90 void DidPostSwapBuffers() override;
93 virtual void DidAbortSwapBuffers() override; 91 void DidAbortSwapBuffers() override;
94 92
95 // WindowAndroidCompositor implementation. 93 // WindowAndroidCompositor implementation.
96 virtual void AttachLayerForReadback(scoped_refptr<cc::Layer> layer) override; 94 void AttachLayerForReadback(scoped_refptr<cc::Layer> layer) override;
97 virtual void RequestCopyOfOutputOnRootLayer( 95 void RequestCopyOfOutputOnRootLayer(
98 scoped_ptr<cc::CopyOutputRequest> request) override; 96 scoped_ptr<cc::CopyOutputRequest> request) override;
99 virtual void OnVSync(base::TimeTicks frame_time, 97 void OnVSync(base::TimeTicks frame_time,
100 base::TimeDelta vsync_period) override; 98 base::TimeDelta vsync_period) override;
101 virtual void SetNeedsAnimate() override; 99 void SetNeedsAnimate() override;
102 100
103 void SetWindowSurface(ANativeWindow* window); 101 void SetWindowSurface(ANativeWindow* window);
104 102
105 enum CompositingTrigger { 103 enum CompositingTrigger {
106 DO_NOT_COMPOSITE, 104 DO_NOT_COMPOSITE,
107 COMPOSITE_IMMEDIATELY, 105 COMPOSITE_IMMEDIATELY,
108 COMPOSITE_EVENTUALLY, 106 COMPOSITE_EVENTUALLY,
109 }; 107 };
110 void PostComposite(CompositingTrigger trigger); 108 void PostComposite(CompositingTrigger trigger);
111 void Composite(CompositingTrigger trigger); 109 void Composite(CompositingTrigger trigger);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 base::TimeTicks last_vsync_; 192 base::TimeTicks last_vsync_;
195 193
196 base::WeakPtrFactory<CompositorImpl> weak_factory_; 194 base::WeakPtrFactory<CompositorImpl> weak_factory_;
197 195
198 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 196 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
199 }; 197 };
200 198
201 } // namespace content 199 } // namespace content
202 200
203 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 201 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698