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

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

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: Rebased 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "cc/output/compositor_frame_sink_client.h" 12 #include "cc/output/compositor_frame_sink_client.h"
13 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" 13 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
14 #include "gpu/command_buffer/common/mailbox.h" 14 #include "gpu/command_buffer/common/mailbox.h"
15 #include "gpu/ipc/common/surface_handle.h" 15 #include "gpu/ipc/common/surface_handle.h"
16 #include "services/ui/public/cpp/window_surface_client.h"
17 16
18 namespace ui { 17 namespace ui {
19 class CompositorFrameSink;
20 class Window; 18 class Window;
19 class WindowCompositorFrameSink;
21 } 20 }
22 21
23 namespace content { 22 namespace content {
24 23
25 // Adapts a WebGraphicsContext3DCommandBufferImpl into a 24 // Adapts a WebGraphicsContext3DCommandBufferImpl into a
26 // cc::OutputSurface that also handles vsync parameter updates 25 // cc::OutputSurface that also handles vsync parameter updates
27 // arriving from the GPU process. 26 // arriving from the GPU process.
28 class MusBrowserCompositorOutputSurface 27 class MusBrowserCompositorOutputSurface
29 : public GpuBrowserCompositorOutputSurface, 28 : public GpuBrowserCompositorOutputSurface,
30 public cc::CompositorFrameSinkClient { 29 public cc::CompositorFrameSinkClient {
(...skipping 26 matching lines...) Expand all
57 void SetExternalTilePriorityConstraints( 56 void SetExternalTilePriorityConstraints(
58 const gfx::Rect& viewport_rect, 57 const gfx::Rect& viewport_rect,
59 const gfx::Transform& transform) override; 58 const gfx::Transform& transform) override;
60 59
61 private: 60 private:
62 uint32_t AllocateResourceId(); 61 uint32_t AllocateResourceId();
63 void FreeResourceId(uint32_t id); 62 void FreeResourceId(uint32_t id);
64 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id); 63 const gpu::Mailbox& GetMailboxFromResourceId(uint32_t id);
65 64
66 ui::Window* ui_window_; 65 ui::Window* ui_window_;
67 std::unique_ptr<ui::CompositorFrameSink> ui_compositor_frame_sink_; 66 std::unique_ptr<ui::WindowCompositorFrameSink> ui_compositor_frame_sink_;
68 std::vector<uint32_t> free_resource_ids_; 67 std::vector<uint32_t> free_resource_ids_;
69 std::vector<gpu::Mailbox> mailboxes_; 68 std::vector<gpu::Mailbox> mailboxes_;
70 69
71 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface); 70 DISALLOW_COPY_AND_ASSIGN(MusBrowserCompositorOutputSurface);
72 }; 71 };
73 72
74 } // namespace content 73 } // namespace content
75 74
76 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 75 #endif // CONTENT_BROWSER_COMPOSITOR_MUS_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/OWNERS ('k') | content/browser/compositor/mus_browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698