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

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

Issue 2646243002: Use IDCompositionSurface to implement DirectCompositionSurfaceWin. (Closed)
Patch Set: rebase Created 3 years, 9 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 14 matching lines...) Expand all
25 const UpdateVSyncParametersCallback& update_vsync_parameters_callback, 25 const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
26 scoped_refptr<base::SingleThreadTaskRunner> task_runner); 26 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
27 27
28 ~SoftwareBrowserCompositorOutputSurface() override; 28 ~SoftwareBrowserCompositorOutputSurface() override;
29 29
30 // OutputSurface implementation. 30 // OutputSurface implementation.
31 void BindToClient(cc::OutputSurfaceClient* client) override; 31 void BindToClient(cc::OutputSurfaceClient* client) override;
32 void EnsureBackbuffer() override; 32 void EnsureBackbuffer() override;
33 void DiscardBackbuffer() override; 33 void DiscardBackbuffer() override;
34 void BindFramebuffer() override; 34 void BindFramebuffer() override;
35 void SetDrawRectangle(const gfx::Rect& draw_rectangle) override;
35 void Reshape(const gfx::Size& size, 36 void Reshape(const gfx::Size& size,
36 float device_scale_factor, 37 float device_scale_factor,
37 const gfx::ColorSpace& color_space, 38 const gfx::ColorSpace& color_space,
38 bool has_alpha, 39 bool has_alpha,
39 bool use_stencil) override; 40 bool use_stencil) override;
40 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 41 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
41 bool IsDisplayedAsOverlayPlane() const override; 42 bool IsDisplayedAsOverlayPlane() const override;
42 unsigned GetOverlayTextureId() const override; 43 unsigned GetOverlayTextureId() const override;
43 bool SurfaceIsSuspendForRecycle() const override; 44 bool SurfaceIsSuspendForRecycle() const override;
44 uint32_t GetFramebufferCopyTextureFormat() override; 45 uint32_t GetFramebufferCopyTextureFormat() override;
45 46
46 private: 47 private:
47 // BrowserCompositorOutputSurface implementation. 48 // BrowserCompositorOutputSurface implementation.
48 #if defined(OS_MACOSX) 49 #if defined(OS_MACOSX)
49 void SetSurfaceSuspendedForRecycle(bool suspended) override; 50 void SetSurfaceSuspendedForRecycle(bool suspended) override;
50 #endif 51 #endif
51 52
52 void SwapBuffersCallback(); 53 void SwapBuffersCallback();
53 54
54 cc::OutputSurfaceClient* client_ = nullptr; 55 cc::OutputSurfaceClient* client_ = nullptr;
55 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 56 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
56 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_; 57 base::WeakPtrFactory<SoftwareBrowserCompositorOutputSurface> weak_factory_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); 59 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface);
59 }; 60 };
60 61
61 } // namespace content 62 } // namespace content
62 63
63 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_ 64 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698