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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 251343002: Remove offscreen compositor contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-offscreencontext: include Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 30 matching lines...) Expand all
41 #include "ui/gfx/size_conversions.h" 41 #include "ui/gfx/size_conversions.h"
42 42
43 namespace { 43 namespace {
44 static base::StaticAtomicSequenceNumber s_layer_tree_host_sequence_number; 44 static base::StaticAtomicSequenceNumber s_layer_tree_host_sequence_number;
45 } 45 }
46 46
47 namespace cc { 47 namespace cc {
48 48
49 RendererCapabilities::RendererCapabilities(ResourceFormat best_texture_format, 49 RendererCapabilities::RendererCapabilities(ResourceFormat best_texture_format,
50 bool allow_partial_texture_updates, 50 bool allow_partial_texture_updates,
51 bool using_offscreen_context3d,
52 int max_texture_size, 51 int max_texture_size,
53 bool using_shared_memory_resources) 52 bool using_shared_memory_resources)
54 : best_texture_format(best_texture_format), 53 : best_texture_format(best_texture_format),
55 allow_partial_texture_updates(allow_partial_texture_updates), 54 allow_partial_texture_updates(allow_partial_texture_updates),
56 using_offscreen_context3d(using_offscreen_context3d),
57 max_texture_size(max_texture_size), 55 max_texture_size(max_texture_size),
58 using_shared_memory_resources(using_shared_memory_resources) {} 56 using_shared_memory_resources(using_shared_memory_resources) {}
59 57
60 RendererCapabilities::RendererCapabilities() 58 RendererCapabilities::RendererCapabilities()
61 : best_texture_format(RGBA_8888), 59 : best_texture_format(RGBA_8888),
62 allow_partial_texture_updates(false), 60 allow_partial_texture_updates(false),
63 using_offscreen_context3d(false),
64 max_texture_size(0), 61 max_texture_size(0),
65 using_shared_memory_resources(false) {} 62 using_shared_memory_resources(false) {}
66 63
67 RendererCapabilities::~RendererCapabilities() {} 64 RendererCapabilities::~RendererCapabilities() {}
68 65
69 scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded( 66 scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
70 LayerTreeHostClient* client, 67 LayerTreeHostClient* client,
71 SharedBitmapManager* manager, 68 SharedBitmapManager* manager,
72 const LayerTreeSettings& settings, 69 const LayerTreeSettings& settings,
73 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) { 70 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
(...skipping 17 matching lines...) Expand all
91 88
92 89
93 LayerTreeHost::LayerTreeHost( 90 LayerTreeHost::LayerTreeHost(
94 LayerTreeHostClient* client, 91 LayerTreeHostClient* client,
95 SharedBitmapManager* manager, 92 SharedBitmapManager* manager,
96 const LayerTreeSettings& settings) 93 const LayerTreeSettings& settings)
97 : micro_benchmark_controller_(this), 94 : micro_benchmark_controller_(this),
98 next_ui_resource_id_(1), 95 next_ui_resource_id_(1),
99 animating_(false), 96 animating_(false),
100 needs_full_tree_sync_(true), 97 needs_full_tree_sync_(true),
101 needs_filter_context_(false),
102 client_(client), 98 client_(client),
103 source_frame_number_(0), 99 source_frame_number_(0),
104 rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()), 100 rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()),
105 output_surface_can_be_initialized_(true), 101 output_surface_can_be_initialized_(true),
106 output_surface_lost_(true), 102 output_surface_lost_(true),
107 num_failed_recreate_attempts_(0), 103 num_failed_recreate_attempts_(0),
108 settings_(settings), 104 settings_(settings),
109 debug_state_(settings.initial_debug_state), 105 debug_state_(settings.initial_debug_state),
110 overdraw_bottom_height_(0.f), 106 overdraw_bottom_height_(0.f),
111 device_scale_factor_(1.f), 107 device_scale_factor_(1.f),
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 swap_promise_list_.push_back(swap_promise.Pass()); 1244 swap_promise_list_.push_back(swap_promise.Pass());
1249 } 1245 }
1250 1246
1251 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1247 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1252 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1248 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1253 swap_promise_list_[i]->DidNotSwap(reason); 1249 swap_promise_list_[i]->DidNotSwap(reason);
1254 swap_promise_list_.clear(); 1250 swap_promise_list_.clear();
1255 } 1251 }
1256 1252
1257 } // namespace cc 1253 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698