OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "cc/surfaces/display.h" | 5 #include "cc/surfaces/display.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 client_->DisplayDamaged(); | 51 client_->DisplayDamaged(); |
52 } | 52 } |
53 | 53 |
54 void Display::InitializeRenderer() { | 54 void Display::InitializeRenderer() { |
55 if (resource_provider_) | 55 if (resource_provider_) |
56 return; | 56 return; |
57 | 57 |
58 int highp_threshold_min = 0; | 58 int highp_threshold_min = 0; |
59 bool use_rgba_4444_texture_format = false; | 59 bool use_rgba_4444_texture_format = false; |
60 size_t id_allocation_chunk_size = 1; | 60 size_t id_allocation_chunk_size = 1; |
61 bool use_distance_field_text = false; | |
62 scoped_ptr<ResourceProvider> resource_provider = | 61 scoped_ptr<ResourceProvider> resource_provider = |
63 ResourceProvider::Create(output_surface_.get(), | 62 ResourceProvider::Create(output_surface_.get(), |
64 bitmap_manager_, | 63 bitmap_manager_, |
65 gpu_memory_buffer_manager_, | 64 gpu_memory_buffer_manager_, |
66 blocking_main_thread_task_runner_.get(), | 65 blocking_main_thread_task_runner_.get(), |
67 highp_threshold_min, | 66 highp_threshold_min, |
68 use_rgba_4444_texture_format, | 67 use_rgba_4444_texture_format, |
69 id_allocation_chunk_size, | 68 id_allocation_chunk_size); |
70 use_distance_field_text); | |
71 if (!resource_provider) | 69 if (!resource_provider) |
72 return; | 70 return; |
73 | 71 |
74 if (output_surface_->context_provider()) { | 72 if (output_surface_->context_provider()) { |
75 scoped_ptr<GLRenderer> renderer = | 73 scoped_ptr<GLRenderer> renderer = |
76 GLRenderer::Create(this, | 74 GLRenderer::Create(this, |
77 &settings_, | 75 &settings_, |
78 output_surface_.get(), | 76 output_surface_.get(), |
79 resource_provider.get(), | 77 resource_provider.get(), |
80 texture_mailbox_deleter_.get(), | 78 texture_mailbox_deleter_.get(), |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 return current_surface_id_; | 168 return current_surface_id_; |
171 } | 169 } |
172 | 170 |
173 int Display::GetMaxFramesPending() { | 171 int Display::GetMaxFramesPending() { |
174 if (!output_surface_) | 172 if (!output_surface_) |
175 return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; | 173 return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; |
176 return output_surface_->capabilities().max_frames_pending; | 174 return output_surface_->capabilities().max_frames_pending; |
177 } | 175 } |
178 | 176 |
179 } // namespace cc | 177 } // namespace cc |
OLD | NEW |