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

Side by Side Diff: content/browser/renderer_host/browser_compositor_view_mac.mm

Issue 2791613002: Make CompositorObserver’s destructor protected-and-virtual. (Closed)
Patch Set: {} --> default Created 3 years, 8 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 | ui/compositor/compositor_observer.h » ('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 #include "content/browser/renderer_host/browser_compositor_view_mac.h" 5 #include "content/browser/renderer_host/browser_compositor_view_mac.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 //////////////////////////////////////////////////////////////////////////////// 50 ////////////////////////////////////////////////////////////////////////////////
51 // RecyclableCompositorMac 51 // RecyclableCompositorMac
52 52
53 // A ui::Compositor and a gfx::AcceleratedWidget (and helper) that it draws 53 // A ui::Compositor and a gfx::AcceleratedWidget (and helper) that it draws
54 // into. This structure is used to efficiently recycle these structures across 54 // into. This structure is used to efficiently recycle these structures across
55 // tabs (because creating a new ui::Compositor for each tab would be expensive 55 // tabs (because creating a new ui::Compositor for each tab would be expensive
56 // in terms of time and resources). 56 // in terms of time and resources).
57 class RecyclableCompositorMac : public ui::CompositorObserver { 57 class RecyclableCompositorMac : public ui::CompositorObserver {
58 public: 58 public:
59 virtual ~RecyclableCompositorMac(); 59 ~RecyclableCompositorMac() override;
60 60
61 // Create a compositor, or recycle a preexisting one. 61 // Create a compositor, or recycle a preexisting one.
62 static std::unique_ptr<RecyclableCompositorMac> Create(); 62 static std::unique_ptr<RecyclableCompositorMac> Create();
63 63
64 // Delete a compositor, or allow it to be recycled. 64 // Delete a compositor, or allow it to be recycled.
65 static void Recycle(std::unique_ptr<RecyclableCompositorMac> compositor); 65 static void Recycle(std::unique_ptr<RecyclableCompositorMac> compositor);
66 66
67 // Indicate that the recyclable compositor should be destroyed, and no future 67 // Indicate that the recyclable compositor should be destroyed, and no future
68 // compositors should be recycled. 68 // compositors should be recycled.
69 static void DisableRecyclingForShutdown(); 69 static void DisableRecyclingForShutdown();
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const { 479 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const {
480 return last_begin_frame_args_; 480 return last_begin_frame_args_;
481 } 481 }
482 482
483 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) { 483 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) {
484 // Only used on Android WebView. 484 // Only used on Android WebView.
485 } 485 }
486 486
487 } // namespace content 487 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/compositor_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698