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

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

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits Created 4 years, 5 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_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 24 matching lines...) Expand all
35 35
36 class FrameSwapMessageQueue; 36 class FrameSwapMessageQueue;
37 class SynchronousCompositorRegistry; 37 class SynchronousCompositorRegistry;
38 class WebGraphicsContext3DCommandBufferImpl; 38 class WebGraphicsContext3DCommandBufferImpl;
39 39
40 class SynchronousCompositorOutputSurfaceClient { 40 class SynchronousCompositorOutputSurfaceClient {
41 public: 41 public:
42 virtual void DidActivatePendingTree() = 0; 42 virtual void DidActivatePendingTree() = 0;
43 virtual void Invalidate() = 0; 43 virtual void Invalidate() = 0;
44 virtual void SwapBuffers(uint32_t output_surface_id, 44 virtual void SwapBuffers(uint32_t output_surface_id,
45 cc::CompositorFrame* frame) = 0; 45 cc::CompositorFrame frame) = 0;
46 46
47 protected: 47 protected:
48 virtual ~SynchronousCompositorOutputSurfaceClient() {} 48 virtual ~SynchronousCompositorOutputSurfaceClient() {}
49 }; 49 };
50 50
51 // Specialization of the output surface that adapts it to implement the 51 // Specialization of the output surface that adapts it to implement the
52 // content::SynchronousCompositor public API. This class effects an "inversion 52 // content::SynchronousCompositor public API. This class effects an "inversion
53 // of control" - enabling drawing to be orchestrated by the embedding 53 // of control" - enabling drawing to be orchestrated by the embedding
54 // layer, instead of driven by the compositor internals - hence it holds two 54 // layer, instead of driven by the compositor internals - hence it holds two
55 // 'client' pointers (|client_| in the OutputSurface baseclass and 55 // 'client' pointers (|client_| in the OutputSurface baseclass and
(...skipping 14 matching lines...) Expand all
70 70
71 void SetSyncClient(SynchronousCompositorOutputSurfaceClient* compositor); 71 void SetSyncClient(SynchronousCompositorOutputSurfaceClient* compositor);
72 bool OnMessageReceived(const IPC::Message& message); 72 bool OnMessageReceived(const IPC::Message& message);
73 73
74 // OutputSurface. 74 // OutputSurface.
75 bool BindToClient(cc::OutputSurfaceClient* surface_client) override; 75 bool BindToClient(cc::OutputSurfaceClient* surface_client) override;
76 void DetachFromClient() override; 76 void DetachFromClient() override;
77 void Reshape(const gfx::Size& size, 77 void Reshape(const gfx::Size& size,
78 float scale_factor, 78 float scale_factor,
79 bool has_alpha) override; 79 bool has_alpha) override;
80 void SwapBuffers(cc::CompositorFrame* frame) override; 80 void SwapBuffers(cc::CompositorFrame frame) override;
81 void Invalidate() override; 81 void Invalidate() override;
82 void BindFramebuffer() override; 82 void BindFramebuffer() override;
83 uint32_t GetFramebufferCopyTextureFormat() override; 83 uint32_t GetFramebufferCopyTextureFormat() override;
84 84
85 // Partial SynchronousCompositor API implementation. 85 // Partial SynchronousCompositor API implementation.
86 void DemandDrawHw(const gfx::Size& surface_size, 86 void DemandDrawHw(const gfx::Size& surface_size,
87 const gfx::Transform& transform, 87 const gfx::Transform& transform,
88 const gfx::Rect& viewport, 88 const gfx::Rect& viewport,
89 const gfx::Rect& clip, 89 const gfx::Rect& clip,
90 const gfx::Rect& viewport_rect_for_tile_priority, 90 const gfx::Rect& viewport_rect_for_tile_priority,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 bool fallback_tick_running_; 133 bool fallback_tick_running_;
134 134
135 base::ThreadChecker thread_checker_; 135 base::ThreadChecker thread_checker_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); 137 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface);
138 }; 138 };
139 139
140 } // namespace content 140 } // namespace content
141 141
142 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ 142 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | content/renderer/android/synchronous_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698