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

Side by Side Diff: content/renderer/android/synchronous_compositor_frame_sink.h

Issue 2349743004: cc: Remove things from OutputSurface and CompositorFrameSink. (Closed)
Patch Set: delete-stuff-cfs: comment-and-rebase Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_
6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/cancelable_callback.h" 13 #include "base/cancelable_callback.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
18 #include "cc/output/compositor_frame.h" 18 #include "cc/output/compositor_frame.h"
19 #include "cc/output/compositor_frame_sink.h" 19 #include "cc/output/compositor_frame_sink.h"
20 #include "cc/output/managed_memory_policy.h" 20 #include "cc/output/managed_memory_policy.h"
21 #include "cc/surfaces/display_client.h" 21 #include "cc/surfaces/display_client.h"
22 #include "cc/surfaces/surface_factory_client.h" 22 #include "cc/surfaces/surface_factory_client.h"
23 #include "ipc/ipc_message.h" 23 #include "ipc/ipc_message.h"
24 #include "ui/gfx/transform.h" 24 #include "ui/gfx/transform.h"
25 25
26 class SkCanvas;
27
26 namespace cc { 28 namespace cc {
27 class ContextProvider; 29 class ContextProvider;
28 class CompositorFrameMetadata; 30 class CompositorFrameMetadata;
29 class Display; 31 class Display;
30 class SurfaceFactory; 32 class SurfaceFactory;
31 class SurfaceIdAllocator; 33 class SurfaceIdAllocator;
32 class SurfaceManager; 34 class SurfaceManager;
33 } 35 }
34 36
35 namespace IPC { 37 namespace IPC {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 SynchronousCompositorRegistry* registry, 77 SynchronousCompositorRegistry* registry,
76 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); 78 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue);
77 ~SynchronousCompositorFrameSink() override; 79 ~SynchronousCompositorFrameSink() override;
78 80
79 void SetSyncClient(SynchronousCompositorFrameSinkClient* compositor); 81 void SetSyncClient(SynchronousCompositorFrameSinkClient* compositor);
80 bool OnMessageReceived(const IPC::Message& message); 82 bool OnMessageReceived(const IPC::Message& message);
81 83
82 // cc::CompositorFrameSink implementation. 84 // cc::CompositorFrameSink implementation.
83 bool BindToClient(cc::CompositorFrameSinkClient* sink_client) override; 85 bool BindToClient(cc::CompositorFrameSinkClient* sink_client) override;
84 void DetachFromClient() override; 86 void DetachFromClient() override;
85 void Reshape(const gfx::Size& size,
86 float scale_factor,
87 const gfx::ColorSpace& color_space,
88 bool has_alpha) override;
89 void SwapBuffers(cc::CompositorFrame frame) override; 87 void SwapBuffers(cc::CompositorFrame frame) override;
90 void Invalidate() override; 88 void Invalidate() override;
91 void BindFramebuffer() override;
92 uint32_t GetFramebufferCopyTextureFormat() override;
93 89
94 // Partial SynchronousCompositor API implementation. 90 // Partial SynchronousCompositor API implementation.
95 void DemandDrawHw(const gfx::Size& viewport_size, 91 void DemandDrawHw(const gfx::Size& viewport_size,
96 const gfx::Rect& viewport_rect_for_tile_priority, 92 const gfx::Rect& viewport_rect_for_tile_priority,
97 const gfx::Transform& transform_for_tile_priority); 93 const gfx::Transform& transform_for_tile_priority);
98 void DemandDrawSw(SkCanvas* canvas); 94 void DemandDrawSw(SkCanvas* canvas);
99 95
100 // SurfaceFactoryClient implementation. 96 // SurfaceFactoryClient implementation.
101 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 97 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
102 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 98 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_; 159 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_;
164 160
165 base::ThreadChecker thread_checker_; 161 base::ThreadChecker thread_checker_;
166 162
167 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorFrameSink); 163 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorFrameSink);
168 }; 164 };
169 165
170 } // namespace content 166 } // namespace content
171 167
172 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ 168 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698