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

Side by Side Diff: cc/surfaces/display.cc

Issue 869433003: (not for commit) Simplified multi-threaded Ganesh with lock on Flush only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 10 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 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/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 client_->DisplayDamaged(); 73 client_->DisplayDamaged();
74 } 74 }
75 75
76 void Display::InitializeRenderer() { 76 void Display::InitializeRenderer() {
77 if (resource_provider_) 77 if (resource_provider_)
78 return; 78 return;
79 79
80 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( 80 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
81 output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_, 81 output_surface_.get(), bitmap_manager_, gpu_memory_buffer_manager_,
82 blocking_main_thread_task_runner_.get(), settings_.highp_threshold_min, 82 blocking_main_thread_task_runner_.get(), settings_.highp_threshold_min,
83 settings_.use_rgba_4444_textures, 83 settings_.use_rgba_4444_textures, false,
84 settings_.texture_id_allocation_chunk_size); 84 settings_.texture_id_allocation_chunk_size);
85 if (!resource_provider) 85 if (!resource_provider)
86 return; 86 return;
87 87
88 if (output_surface_->context_provider()) { 88 if (output_surface_->context_provider()) {
89 scoped_ptr<GLRenderer> renderer = GLRenderer::Create( 89 scoped_ptr<GLRenderer> renderer = GLRenderer::Create(
90 this, &settings_, output_surface_.get(), resource_provider.get(), 90 this, &settings_, output_surface_.get(), resource_provider.get(),
91 texture_mailbox_deleter_.get(), settings_.highp_threshold_min); 91 texture_mailbox_deleter_.get(), settings_.highp_threshold_min);
92 if (!renderer) 92 if (!renderer)
93 return; 93 return;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 int Display::GetMaxFramesPending() { 200 int Display::GetMaxFramesPending() {
201 int max_frames_pending = 201 int max_frames_pending =
202 output_surface_ ? output_surface_->capabilities().max_frames_pending : 0; 202 output_surface_ ? output_surface_->capabilities().max_frames_pending : 0;
203 if (max_frames_pending <= 0) 203 if (max_frames_pending <= 0)
204 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 204 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
205 return max_frames_pending; 205 return max_frames_pending;
206 } 206 }
207 207
208 } // namespace cc 208 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater_unittest.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698