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

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

Issue 2187563006: sync compositor: Set display viewport for software draw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SkISizeToSize Created 4 years, 4 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const gfx::Rect& clip, 97 const gfx::Rect& clip,
98 const gfx::Rect& viewport_rect_for_tile_priority, 98 const gfx::Rect& viewport_rect_for_tile_priority,
99 const gfx::Transform& transform_for_tile_priority); 99 const gfx::Transform& transform_for_tile_priority);
100 void DemandDrawSw(SkCanvas* canvas); 100 void DemandDrawSw(SkCanvas* canvas);
101 101
102 // SurfaceFactoryClient implementation. 102 // SurfaceFactoryClient implementation.
103 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 103 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
104 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 104 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
105 105
106 private: 106 private:
107 class SoftwareOutputSurface;
108
107 void InvokeComposite(const gfx::Transform& transform, 109 void InvokeComposite(const gfx::Transform& transform,
108 const gfx::Rect& viewport, 110 const gfx::Rect& viewport,
109 const gfx::Rect& clip); 111 const gfx::Rect& clip);
110 bool Send(IPC::Message* message); 112 bool Send(IPC::Message* message);
111 void DidActivatePendingTree(); 113 void DidActivatePendingTree();
112 void DeliverMessages(); 114 void DeliverMessages();
113 bool CalledOnValidThread() const; 115 bool CalledOnValidThread() const;
114 116
115 void CancelFallbackTick(); 117 void CancelFallbackTick();
116 void FallbackTickFired(); 118 void FallbackTickFired();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface 152 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface
151 // is owned/destroyed on the compositor thread. 153 // is owned/destroyed on the compositor thread.
152 std::unique_ptr<cc::SurfaceManager> surface_manager_; 154 std::unique_ptr<cc::SurfaceManager> surface_manager_;
153 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 155 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
154 cc::SurfaceId delegated_surface_id_; 156 cc::SurfaceId delegated_surface_id_;
155 // Uses surface_manager_. 157 // Uses surface_manager_.
156 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 158 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
157 StubDisplayClient display_client_; 159 StubDisplayClient display_client_;
158 // Uses surface_manager_. 160 // Uses surface_manager_.
159 std::unique_ptr<cc::Display> display_; 161 std::unique_ptr<cc::Display> display_;
162 // Owned by |display_|.
163 SoftwareOutputSurface* software_output_surface_ = nullptr;
160 164
161 base::ThreadChecker thread_checker_; 165 base::ThreadChecker thread_checker_;
162 166
163 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); 167 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface);
164 }; 168 };
165 169
166 } // namespace content 170 } // namespace content
167 171
168 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ 172 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display.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