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

Side by Side Diff: content/browser/compositor/gpu_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_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 gfx::SwapResult result, 53 gfx::SwapResult result,
54 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); 54 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac);
55 55
56 // BrowserCompositorOutputSurface implementation. 56 // BrowserCompositorOutputSurface implementation.
57 void OnReflectorChanged() override; 57 void OnReflectorChanged() override;
58 #if defined(OS_MACOSX) 58 #if defined(OS_MACOSX)
59 void SetSurfaceSuspendedForRecycle(bool suspended) override; 59 void SetSurfaceSuspendedForRecycle(bool suspended) override;
60 #endif 60 #endif
61 61
62 // cc::OutputSurface implementation. 62 // cc::OutputSurface implementation.
63 bool BindToClient(cc::OutputSurfaceClient* client) override; 63 void BindToClient(cc::OutputSurfaceClient* client) override;
64 void EnsureBackbuffer() override; 64 void EnsureBackbuffer() override;
65 void DiscardBackbuffer() override; 65 void DiscardBackbuffer() override;
66 void BindFramebuffer() override; 66 void BindFramebuffer() override;
67 void Reshape(const gfx::Size& size, 67 void Reshape(const gfx::Size& size,
68 float device_scale_factor, 68 float device_scale_factor,
69 const gfx::ColorSpace& color_space, 69 const gfx::ColorSpace& color_space,
70 bool has_alpha) override; 70 bool has_alpha) override;
71 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 71 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
72 uint32_t GetFramebufferCopyTextureFormat() override; 72 uint32_t GetFramebufferCopyTextureFormat() override;
73 bool IsDisplayedAsOverlayPlane() const override; 73 bool IsDisplayedAsOverlayPlane() const override;
74 unsigned GetOverlayTextureId() const override; 74 unsigned GetOverlayTextureId() const override;
75 bool SurfaceIsSuspendForRecycle() const override; 75 bool SurfaceIsSuspendForRecycle() const override;
76 76
77 protected: 77 protected:
78 gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); 78 gpu::CommandBufferProxyImpl* GetCommandBufferProxy();
79 79
80 cc::OutputSurfaceClient* client_ = nullptr;
80 std::unique_ptr<ReflectorTexture> reflector_texture_; 81 std::unique_ptr<ReflectorTexture> reflector_texture_;
81 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_; 82 base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_;
82 83
83 private: 84 private:
84 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface); 85 DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
85 }; 86 };
86 87
87 } // namespace content 88 } // namespace content
88 89
89 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 90 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698