OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 // GpuChannelHostFactory implementation: | 406 // GpuChannelHostFactory implementation: |
407 virtual bool IsMainThread() override; | 407 virtual bool IsMainThread() override; |
408 virtual base::MessageLoop* GetMainLoop() override; | 408 virtual base::MessageLoop* GetMainLoop() override; |
409 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() override; | 409 virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() override; |
410 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( | 410 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory( |
411 size_t size) override; | 411 size_t size) override; |
412 virtual CreateCommandBufferResult CreateViewCommandBuffer( | 412 virtual CreateCommandBufferResult CreateViewCommandBuffer( |
413 int32 surface_id, | 413 int32 surface_id, |
414 const GPUCreateCommandBufferConfig& init_params, | 414 const GPUCreateCommandBufferConfig& init_params, |
415 int32 route_id) override; | 415 int32 route_id) override; |
416 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | |
417 size_t width, | |
418 size_t height, | |
419 unsigned internalformat, | |
420 unsigned usage) override; | |
421 | 416 |
422 void Init(); | 417 void Init(); |
423 | 418 |
424 void OnCreateNewFrame(int routing_id, int parent_routing_id); | 419 void OnCreateNewFrame(int routing_id, int parent_routing_id); |
425 void OnCreateNewFrameProxy(int routing_id, | 420 void OnCreateNewFrameProxy(int routing_id, |
426 int parent_routing_id, | 421 int parent_routing_id, |
427 int render_view_routing_id); | 422 int render_view_routing_id); |
428 void OnSetZoomLevelForCurrentURL(const std::string& scheme, | 423 void OnSetZoomLevelForCurrentURL(const std::string& scheme, |
429 const std::string& host, | 424 const std::string& host, |
430 double zoom_level); | 425 double zoom_level); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; | 547 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; |
553 | 548 |
554 HistogramCustomizer histogram_customizer_; | 549 HistogramCustomizer histogram_customizer_; |
555 | 550 |
556 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 551 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
557 | 552 |
558 #if defined(ENABLE_WEBRTC) | 553 #if defined(ENABLE_WEBRTC) |
559 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; | 554 scoped_ptr<WebRTCIdentityService> webrtc_identity_service_; |
560 #endif | 555 #endif |
561 | 556 |
562 // TODO(reveman): Allow AllocateGpuMemoryBuffer to be called from | |
563 // multiple threads. Current allocation mechanism for IOSurface | |
564 // backed GpuMemoryBuffers prevent this. crbug.com/325045 | |
565 base::ThreadChecker allocate_gpu_memory_buffer_thread_checker_; | |
566 | |
567 scoped_ptr<MemoryObserver> memory_observer_; | 557 scoped_ptr<MemoryObserver> memory_observer_; |
568 | 558 |
569 scoped_refptr<base::SingleThreadTaskRunner> | 559 scoped_refptr<base::SingleThreadTaskRunner> |
570 main_thread_compositor_task_runner_; | 560 main_thread_compositor_task_runner_; |
571 | 561 |
572 // Compositor settings | 562 // Compositor settings |
573 bool is_gpu_rasterization_enabled_; | 563 bool is_gpu_rasterization_enabled_; |
574 bool is_gpu_rasterization_forced_; | 564 bool is_gpu_rasterization_forced_; |
575 bool is_impl_side_painting_enabled_; | 565 bool is_impl_side_painting_enabled_; |
576 bool is_lcd_text_enabled_; | 566 bool is_lcd_text_enabled_; |
577 bool is_distance_field_text_enabled_; | 567 bool is_distance_field_text_enabled_; |
578 bool is_zero_copy_enabled_; | 568 bool is_zero_copy_enabled_; |
579 bool is_one_copy_enabled_; | 569 bool is_one_copy_enabled_; |
580 | 570 |
581 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_; | 571 std::map<int, mojo::MessagePipeHandle> pending_render_frame_connects_; |
582 | 572 |
583 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 573 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
584 }; | 574 }; |
585 | 575 |
586 } // namespace content | 576 } // namespace content |
587 | 577 |
588 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 578 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |