| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/raster_worker_pool.h" | 5 #include "cc/resources/raster_worker_pool.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event_synthetic_delay.h" | 7 #include "base/debug/trace_event_synthetic_delay.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 gfx::Size size, | 176 gfx::Size size, |
| 177 int stride) OVERRIDE { | 177 int stride) OVERRIDE { |
| 178 // TODO(alokp): For now run-on-worker-thread implies software rasterization. | 178 // TODO(alokp): For now run-on-worker-thread implies software rasterization. |
| 179 DCHECK(!use_gpu_rasterization()); | 179 DCHECK(!use_gpu_rasterization()); |
| 180 RunAnalysisOnThread(thread_index); | 180 RunAnalysisOnThread(thread_index); |
| 181 return RunRasterOnThread(thread_index, buffer, size, stride); | 181 return RunRasterOnThread(thread_index, buffer, size, stride); |
| 182 } | 182 } |
| 183 | 183 |
| 184 virtual void RunOnOriginThread(ResourceProvider* resource_provider, | 184 virtual void RunOnOriginThread(ResourceProvider* resource_provider, |
| 185 ContextProvider* context_provider) OVERRIDE { | 185 ContextProvider* context_provider) OVERRIDE { |
| 186 TRACE_EVENT1("cc", |
| 187 "RasterWorkerPoolTaskImpl::RunOnOriginThread", |
| 188 "data", |
| 189 TracedValue::FromValue(DataAsValue().release())); |
| 186 // TODO(alokp): For now run-on-origin-thread implies gpu rasterization. | 190 // TODO(alokp): For now run-on-origin-thread implies gpu rasterization. |
| 187 DCHECK(use_gpu_rasterization()); | 191 DCHECK(use_gpu_rasterization()); |
| 188 ResourceProvider::ScopedWriteLockGL lock(resource_provider, | 192 ResourceProvider::ScopedWriteLockGL lock(resource_provider, |
| 189 resource()->id()); | 193 resource()->id()); |
| 190 DCHECK_NE(lock.texture_id(), 0u); | 194 DCHECK_NE(lock.texture_id(), 0u); |
| 191 | 195 |
| 192 GrBackendTextureDesc desc; | 196 GrBackendTextureDesc desc; |
| 193 desc.fFlags = kRenderTarget_GrBackendTextureFlag; | 197 desc.fFlags = kRenderTarget_GrBackendTextureFlag; |
| 194 desc.fWidth = content_rect_.width(); | 198 desc.fWidth = content_rect_.width(); |
| 195 desc.fHeight = content_rect_.height(); | 199 desc.fHeight = content_rect_.height(); |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 | 774 |
| 771 internal::GraphNode* decode_node = | 775 internal::GraphNode* decode_node = |
| 772 CreateGraphNodeForTask(decode_task, priority, graph); | 776 CreateGraphNodeForTask(decode_task, priority, graph); |
| 773 decode_node->add_dependent(raster_node); | 777 decode_node->add_dependent(raster_node); |
| 774 } | 778 } |
| 775 | 779 |
| 776 return raster_node; | 780 return raster_node; |
| 777 } | 781 } |
| 778 | 782 |
| 779 } // namespace cc | 783 } // namespace cc |
| OLD | NEW |