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

Side by Side Diff: cc/resources/tile_manager.cc

Issue 14409006: cc: Changes to use GL API for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Add internalformat parameter to CreateImageCHROMIUM in fake_web_graphics_context_3d to fix clang bu… Created 7 years, 7 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
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 "<unknown TileManagerBinPriority value>")); 103 "<unknown TileManagerBinPriority value>"));
104 } 104 }
105 } 105 }
106 106
107 // static 107 // static
108 scoped_ptr<TileManager> TileManager::Create( 108 scoped_ptr<TileManager> TileManager::Create(
109 TileManagerClient* client, 109 TileManagerClient* client,
110 ResourceProvider* resource_provider, 110 ResourceProvider* resource_provider,
111 size_t num_raster_threads, 111 size_t num_raster_threads,
112 bool use_color_estimator, 112 bool use_color_estimator,
113 RenderingStatsInstrumentation* rendering_stats_instrumentation) { 113 RenderingStatsInstrumentation* rendering_stats_instrumentation,
114 bool use_map_image) {
114 scoped_ptr<RasterWorkerPool> raster_worker_pool = 115 scoped_ptr<RasterWorkerPool> raster_worker_pool =
115 RasterWorkerPool::Create(num_raster_threads); 116 RasterWorkerPool::Create(num_raster_threads);
116 return make_scoped_ptr(new TileManager(client, 117 return make_scoped_ptr(new TileManager(client,
117 resource_provider, 118 resource_provider,
118 raster_worker_pool.Pass(), 119 raster_worker_pool.Pass(),
119 num_raster_threads, 120 num_raster_threads,
120 use_color_estimator, 121 use_color_estimator,
121 rendering_stats_instrumentation)); 122 rendering_stats_instrumentation,
123 use_map_image));
122 } 124 }
123 125
124 TileManager::TileManager( 126 TileManager::TileManager(
125 TileManagerClient* client, 127 TileManagerClient* client,
126 ResourceProvider* resource_provider, 128 ResourceProvider* resource_provider,
127 scoped_ptr<RasterWorkerPool> raster_worker_pool, 129 scoped_ptr<RasterWorkerPool> raster_worker_pool,
128 size_t num_raster_threads, 130 size_t num_raster_threads,
129 bool use_color_estimator, 131 bool use_color_estimator,
130 RenderingStatsInstrumentation* rendering_stats_instrumentation) 132 RenderingStatsInstrumentation* rendering_stats_instrumentation,
133 bool use_map_image)
131 : client_(client), 134 : client_(client),
132 resource_pool_(ResourcePool::Create(resource_provider)), 135 resource_pool_(ResourcePool::Create(resource_provider)),
133 raster_worker_pool_(raster_worker_pool.Pass()), 136 raster_worker_pool_(raster_worker_pool.Pass()),
134 manage_tiles_pending_(false), 137 manage_tiles_pending_(false),
135 manage_tiles_call_count_(0), 138 manage_tiles_call_count_(0),
136 bytes_pending_upload_(0), 139 bytes_pending_upload_(0),
137 has_performed_uploads_since_last_flush_(false), 140 has_performed_uploads_since_last_flush_(false),
138 ever_exceeded_memory_budget_(false), 141 ever_exceeded_memory_budget_(false),
139 rendering_stats_instrumentation_(rendering_stats_instrumentation), 142 rendering_stats_instrumentation_(rendering_stats_instrumentation),
140 use_color_estimator_(use_color_estimator), 143 use_color_estimator_(use_color_estimator),
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask"); 986 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask");
984 devtools_instrumentation::ScopedLayerTask image_decode_task( 987 devtools_instrumentation::ScopedLayerTask image_decode_task(
985 devtools_instrumentation::kImageDecodeTask, layer_id); 988 devtools_instrumentation::kImageDecodeTask, layer_id);
986 base::TimeTicks start_time = stats_instrumentation->StartRecording(); 989 base::TimeTicks start_time = stats_instrumentation->StartRecording();
987 pixel_ref->Decode(); 990 pixel_ref->Decode();
988 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time); 991 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);
989 stats_instrumentation->AddDeferredImageDecode(duration); 992 stats_instrumentation->AddDeferredImageDecode(duration);
990 } 993 }
991 994
992 } // namespace cc 995 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698