| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 66   client_->DisplayDamaged(); | 66   client_->DisplayDamaged(); | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 void Display::InitializeRenderer() { | 69 void Display::InitializeRenderer() { | 
| 70   if (resource_provider_) | 70   if (resource_provider_) | 
| 71     return; | 71     return; | 
| 72 | 72 | 
| 73   scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( | 73   scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( | 
| 74       output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_, | 74       output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_, | 
| 75       blocking_main_thread_task_runner_.get(), settings_.highp_threshold_min, | 75       blocking_main_thread_task_runner_.get(), settings_.highp_threshold_min, | 
| 76       settings_.use_rgba_4444_textures, | 76       settings_.use_rgba_4444_textures, false, | 
| 77       settings_.texture_id_allocation_chunk_size); | 77       settings_.texture_id_allocation_chunk_size); | 
| 78   if (!resource_provider) | 78   if (!resource_provider) | 
| 79     return; | 79     return; | 
| 80 | 80 | 
| 81   if (output_surface_->context_provider()) { | 81   if (output_surface_->context_provider()) { | 
| 82     scoped_ptr<GLRenderer> renderer = GLRenderer::Create( | 82     scoped_ptr<GLRenderer> renderer = GLRenderer::Create( | 
| 83         this, &settings_, output_surface_.get(), resource_provider.get(), | 83         this, &settings_, output_surface_.get(), resource_provider.get(), | 
| 84         texture_mailbox_deleter_.get(), settings_.highp_threshold_min); | 84         texture_mailbox_deleter_.get(), settings_.highp_threshold_min); | 
| 85     if (!renderer) | 85     if (!renderer) | 
| 86       return; | 86       return; | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 180   return current_surface_id_; | 180   return current_surface_id_; | 
| 181 } | 181 } | 
| 182 | 182 | 
| 183 int Display::GetMaxFramesPending() { | 183 int Display::GetMaxFramesPending() { | 
| 184   if (!output_surface_) | 184   if (!output_surface_) | 
| 185     return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; | 185     return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; | 
| 186   return output_surface_->capabilities().max_frames_pending; | 186   return output_surface_->capabilities().max_frames_pending; | 
| 187 } | 187 } | 
| 188 | 188 | 
| 189 }  // namespace cc | 189 }  // namespace cc | 
| OLD | NEW | 
|---|