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

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

Issue 2399983003: cc: Make OutputSurface::Reshape abstract (Closed)
Patch Set: reshapeabstract: . 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 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 17 matching lines...) Expand all
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 31
32 ~SoftwareBrowserCompositorOutputSurface() override; 32 ~SoftwareBrowserCompositorOutputSurface() override;
33 33
34 // OutputSurface implementation. 34 // OutputSurface implementation.
35 void EnsureBackbuffer() override; 35 void EnsureBackbuffer() override;
36 void DiscardBackbuffer() override; 36 void DiscardBackbuffer() override;
37 void BindFramebuffer() override; 37 void BindFramebuffer() override;
38 void Reshape(const gfx::Size& size,
39 float device_scale_factor,
40 const gfx::ColorSpace& color_space,
41 bool has_alpha) override;
38 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 42 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
39 bool IsDisplayedAsOverlayPlane() const override; 43 bool IsDisplayedAsOverlayPlane() const override;
40 unsigned GetOverlayTextureId() const override; 44 unsigned GetOverlayTextureId() const override;
41 bool SurfaceIsSuspendForRecycle() const override; 45 bool SurfaceIsSuspendForRecycle() const override;
42 uint32_t GetFramebufferCopyTextureFormat() override; 46 uint32_t GetFramebufferCopyTextureFormat() override;
43 47
44 private: 48 private:
45 // BrowserCompositorOutputSurface implementation. 49 // BrowserCompositorOutputSurface implementation.
46 void OnGpuSwapBuffersCompleted( 50 void OnGpuSwapBuffersCompleted(
47 const std::vector<ui::LatencyInfo>& latency_info, 51 const std::vector<ui::LatencyInfo>& latency_info,
48 gfx::SwapResult result, 52 gfx::SwapResult result,
49 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override; 53 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override;
50 54
51 #if defined(OS_MACOSX) 55 #if defined(OS_MACOSX)
52 void SetSurfaceSuspendedForRecycle(bool suspended) override; 56 void SetSurfaceSuspendedForRecycle(bool suspended) override;
53 #endif 57 #endif
54 58
55 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; 59 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_;
56 60
57 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); 61 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface);
58 }; 62 };
59 63
60 } // namespace content 64 } // namespace content
61 65
62 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_ 66 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698