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

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

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/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
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
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
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