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

Side by Side Diff: components/html_viewer/setup.h

Issue 1189833005: Revert of Support impl-side painting in Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 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 COMPONENTS_HTML_VIEWER_SETUP_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_SETUP_H_
6 #define COMPONENTS_HTML_VIEWER_SETUP_H_ 6 #define COMPONENTS_HTML_VIEWER_SETUP_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
11 #include "components/html_viewer/discardable_memory_allocator.h" 11 #include "components/html_viewer/discardable_memory_allocator.h"
12 #include "components/resource_provider/public/cpp/resource_loader.h" 12 #include "components/resource_provider/public/cpp/resource_loader.h"
13 #include "components/view_manager/gles2/mojo_gpu_memory_buffer_manager.h"
14 #include "components/view_manager/gles2/raster_thread_helper.h"
15 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
16 14
17 namespace mojo { 15 namespace mojo {
18 class ApplicationImpl; 16 class ApplicationImpl;
19 class Shell; 17 class Shell;
20 } 18 }
21 19
22 namespace scheduler { 20 namespace scheduler {
23 class RendererScheduler; 21 class RendererScheduler;
24 } 22 }
(...skipping 28 matching lines...) Expand all
53 const gfx::Size& screen_size_in_pixels() const { 51 const gfx::Size& screen_size_in_pixels() const {
54 return screen_size_in_pixels_; 52 return screen_size_in_pixels_;
55 } 53 }
56 54
57 float device_pixel_ratio() const { return device_pixel_ratio_; } 55 float device_pixel_ratio() const { return device_pixel_ratio_; }
58 56
59 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread() { 57 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread() {
60 return compositor_thread_.task_runner(); 58 return compositor_thread_.task_runner();
61 } 59 }
62 60
63 gles2::RasterThreadHelper* raster_thread_helper() {
64 return &raster_thread_helper_;
65 }
66
67 gles2::MojoGpuMemoryBufferManager* gpu_memory_buffer_manager() {
68 return &gpu_memory_buffer_manager_;
69 }
70
71 MediaFactory* media_factory() { return media_factory_.get(); } 61 MediaFactory* media_factory() { return media_factory_.get(); }
72 62
73 private: 63 private:
74 // App for HTMLViewer, not the document's app. 64 // App for HTMLViewer, not the document's app.
75 // WARNING: do not expose this. It's too easy to use the wrong one. 65 // WARNING: do not expose this. It's too easy to use the wrong one.
76 // HTMLDocument should be using the application it creates, not this one. 66 // HTMLDocument should be using the application it creates, not this one.
77 mojo::ApplicationImpl* app_; 67 mojo::ApplicationImpl* app_;
78 68
79 resource_provider::ResourceLoader resource_loader_; 69 resource_provider::ResourceLoader resource_loader_;
80 70
(...skipping 12 matching lines...) Expand all
93 // this doesn't use purgable shared memory. Instead, it tries to free the 83 // this doesn't use purgable shared memory. Instead, it tries to free the
94 // oldest unlocked chunks on allocation. 84 // oldest unlocked chunks on allocation.
95 // 85 //
96 // TODO(erg): In the long run, delete this allocator and get the real shared 86 // TODO(erg): In the long run, delete this allocator and get the real shared
97 // memory based purging allocator working here. 87 // memory based purging allocator working here.
98 DiscardableMemoryAllocator discardable_memory_allocator_; 88 DiscardableMemoryAllocator discardable_memory_allocator_;
99 89
100 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; 90 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_;
101 scoped_ptr<BlinkPlatformImpl> blink_platform_; 91 scoped_ptr<BlinkPlatformImpl> blink_platform_;
102 base::Thread compositor_thread_; 92 base::Thread compositor_thread_;
103 gles2::RasterThreadHelper raster_thread_helper_;
104 gles2::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_;
105 scoped_ptr<MediaFactory> media_factory_; 93 scoped_ptr<MediaFactory> media_factory_;
106 94
107 DISALLOW_COPY_AND_ASSIGN(Setup); 95 DISALLOW_COPY_AND_ASSIGN(Setup);
108 }; 96 };
109 97
110 } // namespace html_viewer 98 } // namespace html_viewer
111 99
112 #endif // COMPONENTS_HTML_VIEWER_SETUP_H_ 100 #endif // COMPONENTS_HTML_VIEWER_SETUP_H_
OLDNEW
« no previous file with comments | « components/html_viewer/html_document.cc ('k') | components/html_viewer/web_layer_tree_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698