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

Side by Side Diff: content/browser/compositor/software_browser_compositor_output_surface.h

Issue 2443003004: cc: Make OutputSurface::BindToClient pure virtual and not return bool (Closed)
Patch Set: bindtoclient-pure-virtual: rebase Created 4 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
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 CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 SoftwareBrowserCompositorOutputSurface( 27 SoftwareBrowserCompositorOutputSurface(
28 std::unique_ptr<cc::SoftwareOutputDevice> software_device, 28 std::unique_ptr<cc::SoftwareOutputDevice> software_device,
29 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 29 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
30 cc::SyntheticBeginFrameSource* begin_frame_source, 30 cc::SyntheticBeginFrameSource* begin_frame_source,
31 scoped_refptr<base::SingleThreadTaskRunner> task_runner); 31 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
32 32
33 ~SoftwareBrowserCompositorOutputSurface() override; 33 ~SoftwareBrowserCompositorOutputSurface() override;
34 34
35 // OutputSurface implementation. 35 // OutputSurface implementation.
36 void BindToClient(cc::OutputSurfaceClient* client) override;
36 void EnsureBackbuffer() override; 37 void EnsureBackbuffer() override;
37 void DiscardBackbuffer() override; 38 void DiscardBackbuffer() override;
38 void BindFramebuffer() override; 39 void BindFramebuffer() override;
39 void Reshape(const gfx::Size& size, 40 void Reshape(const gfx::Size& size,
40 float device_scale_factor, 41 float device_scale_factor,
41 const gfx::ColorSpace& color_space, 42 const gfx::ColorSpace& color_space,
42 bool has_alpha) override; 43 bool has_alpha) override;
43 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 44 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
44 bool IsDisplayedAsOverlayPlane() const override; 45 bool IsDisplayedAsOverlayPlane() const override;
45 unsigned GetOverlayTextureId() const override; 46 unsigned GetOverlayTextureId() const override;
46 bool SurfaceIsSuspendForRecycle() const override; 47 bool SurfaceIsSuspendForRecycle() const override;
47 uint32_t GetFramebufferCopyTextureFormat() override; 48 uint32_t GetFramebufferCopyTextureFormat() override;
48 49
49 private: 50 private:
50 // BrowserCompositorOutputSurface implementation. 51 // BrowserCompositorOutputSurface implementation.
51 #if defined(OS_MACOSX) 52 #if defined(OS_MACOSX)
52 void SetSurfaceSuspendedForRecycle(bool suspended) override; 53 void SetSurfaceSuspendedForRecycle(bool suspended) override;
53 #endif 54 #endif
54 55
55 void SwapBuffersCallback(); 56 void SwapBuffersCallback();
56 57
58 cc::OutputSurfaceClient* client_ = nullptr;
57 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 59 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
58 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; 60 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_;
59 61
60 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); 62 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface);
61 }; 63 };
62 64
63 } // namespace content 65 } // namespace content
64 66
65 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_ 67 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698