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

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

Issue 2352963002: cc: Make most of cc::OutputSurface abstract. (Closed)
Patch Set: outputsurface-cleanup: rebase Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _
6 #define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _ 6 #define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H _
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 26 matching lines...) Expand all
37 37
38 protected: 38 protected:
39 // cc::OutputSurface: 39 // cc::OutputSurface:
40 void EnsureBackbuffer() override; 40 void EnsureBackbuffer() override;
41 void DiscardBackbuffer() override; 41 void DiscardBackbuffer() override;
42 void Reshape(const gfx::Size& size, 42 void Reshape(const gfx::Size& size,
43 float scale_factor, 43 float scale_factor,
44 const gfx::ColorSpace& color_space, 44 const gfx::ColorSpace& color_space,
45 bool alpha) override; 45 bool alpha) override;
46 void BindFramebuffer() override; 46 void BindFramebuffer() override;
47 void SwapBuffers(cc::CompositorFrame frame) override;
48 bool IsDisplayedAsOverlayPlane() const override;
49 unsigned GetOverlayTextureId() const override;
50 bool SurfaceIsSuspendForRecycle() const override;
47 uint32_t GetFramebufferCopyTextureFormat() override; 51 uint32_t GetFramebufferCopyTextureFormat() override;
48 void SwapBuffers(cc::CompositorFrame frame) override;
49 52
50 // BrowserCompositorOutputSurface 53 // BrowserCompositorOutputSurface
51 void OnReflectorChanged() override; 54 void OnReflectorChanged() override;
52 void OnGpuSwapBuffersCompleted( 55 void OnGpuSwapBuffersCompleted(
53 const std::vector<ui::LatencyInfo>& latency_info, 56 const std::vector<ui::LatencyInfo>& latency_info,
54 gfx::SwapResult result, 57 gfx::SwapResult result,
55 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override{}; 58 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override{};
56 #if defined(OS_MACOSX) 59 #if defined(OS_MACOSX)
57 void SetSurfaceSuspendedForRecycle(bool suspended) override {}; 60 void SetSurfaceSuspendedForRecycle(bool suspended) override {};
58 #endif 61 #endif
59 62
60 uint32_t fbo_; 63 uint32_t fbo_;
61 bool is_backbuffer_discarded_; 64 bool is_backbuffer_discarded_;
62 std::unique_ptr<ReflectorTexture> reflector_texture_; 65 std::unique_ptr<ReflectorTexture> reflector_texture_;
63 66
64 base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface> 67 base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface>
65 weak_ptr_factory_; 68 weak_ptr_factory_;
66 69
67 private: 70 private:
71 void OnSwapBuffersComplete();
72
68 DISALLOW_COPY_AND_ASSIGN(OffscreenBrowserCompositorOutputSurface); 73 DISALLOW_COPY_AND_ASSIGN(OffscreenBrowserCompositorOutputSurface);
69 }; 74 };
70 75
71 } // namespace content 76 } // namespace content
72 77
73 #endif // CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFAC E_H_ 78 #endif // CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFAC E_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698