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

Side by Side Diff: content/browser/android/synchronous_compositor_host.h

Issue 2487713002: Resolves layering violation in SynchronousCompositorHost creation (Closed)
Patch Set: checking synchronous_compositor_client_ Created 4 years, 1 month 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
« no previous file with comments | « no previous file | content/browser/android/synchronous_compositor_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_
6 #define CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ 6 #define CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 class RenderWidgetHostViewAndroid; 35 class RenderWidgetHostViewAndroid;
36 class SynchronousCompositorClient; 36 class SynchronousCompositorClient;
37 class SynchronousCompositorBrowserFilter; 37 class SynchronousCompositorBrowserFilter;
38 class WebContents; 38 class WebContents;
39 struct SyncCompositorCommonRendererParams; 39 struct SyncCompositorCommonRendererParams;
40 40
41 class SynchronousCompositorHost : public SynchronousCompositor { 41 class SynchronousCompositorHost : public SynchronousCompositor {
42 public: 42 public:
43 static std::unique_ptr<SynchronousCompositorHost> Create( 43 static std::unique_ptr<SynchronousCompositorHost> Create(
44 RenderWidgetHostViewAndroid* rwhva, 44 RenderWidgetHostViewAndroid* rwhva);
45 WebContents* web_contents);
46 45
47 ~SynchronousCompositorHost() override; 46 ~SynchronousCompositorHost() override;
48 47
49 // SynchronousCompositor overrides. 48 // SynchronousCompositor overrides.
50 SynchronousCompositor::Frame DemandDrawHw( 49 SynchronousCompositor::Frame DemandDrawHw(
51 const gfx::Size& viewport_size, 50 const gfx::Size& viewport_size,
52 const gfx::Rect& viewport_rect_for_tile_priority, 51 const gfx::Rect& viewport_rect_for_tile_priority,
53 const gfx::Transform& transform_for_tile_priority) override; 52 const gfx::Transform& transform_for_tile_priority) override;
54 scoped_refptr<FrameFuture> DemandDrawHwAsync( 53 scoped_refptr<FrameFuture> DemandDrawHwAsync(
55 const gfx::Size& viewport_size, 54 const gfx::Size& viewport_size,
(...skipping 19 matching lines...) Expand all
75 74
76 SynchronousCompositorClient* client() { return client_; } 75 SynchronousCompositorClient* client() { return client_; }
77 76
78 private: 77 private:
79 class ScopedSendZeroMemory; 78 class ScopedSendZeroMemory;
80 struct SharedMemoryWithSize; 79 struct SharedMemoryWithSize;
81 friend class ScopedSetZeroMemory; 80 friend class ScopedSetZeroMemory;
82 friend class SynchronousCompositorBase; 81 friend class SynchronousCompositorBase;
83 82
84 SynchronousCompositorHost(RenderWidgetHostViewAndroid* rwhva, 83 SynchronousCompositorHost(RenderWidgetHostViewAndroid* rwhva,
85 SynchronousCompositorClient* client,
86 bool use_in_proc_software_draw); 84 bool use_in_proc_software_draw);
87 void CompositorFrameSinkCreated(); 85 void CompositorFrameSinkCreated();
88 bool DemandDrawSwInProc(SkCanvas* canvas); 86 bool DemandDrawSwInProc(SkCanvas* canvas);
89 void SetSoftwareDrawSharedMemoryIfNeeded(size_t stride, size_t buffer_size); 87 void SetSoftwareDrawSharedMemoryIfNeeded(size_t stride, size_t buffer_size);
90 void SendZeroMemory(); 88 void SendZeroMemory();
91 SynchronousCompositorBrowserFilter* GetFilter(); 89 SynchronousCompositorBrowserFilter* GetFilter();
92 90
93 RenderWidgetHostViewAndroid* const rwhva_; 91 RenderWidgetHostViewAndroid* const rwhva_;
94 SynchronousCompositorClient* const client_; 92 SynchronousCompositorClient* const client_;
95 const scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 93 const scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
(...skipping 18 matching lines...) Expand all
114 bool need_animate_scroll_; 112 bool need_animate_scroll_;
115 uint32_t need_invalidate_count_; 113 uint32_t need_invalidate_count_;
116 uint32_t did_activate_pending_tree_count_; 114 uint32_t did_activate_pending_tree_count_;
117 115
118 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorHost); 116 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorHost);
119 }; 117 };
120 118
121 } // namespace content 119 } // namespace content
122 120
123 #endif // CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_ 121 #endif // CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/synchronous_compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698