| OLD | NEW |
| 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/raster/one_copy_raster_buffer_provider.h" | 5 #include "cc/raster/one_copy_raster_buffer_provider.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
| 15 #include "base/trace_event/trace_event.h" |
| 15 #include "cc/base/histograms.h" | 16 #include "cc/base/histograms.h" |
| 16 #include "cc/base/math_util.h" | 17 #include "cc/base/math_util.h" |
| 17 #include "cc/resources/platform_color.h" | 18 #include "cc/resources/platform_color.h" |
| 18 #include "cc/resources/resource_format.h" | 19 #include "cc/resources/resource_format.h" |
| 19 #include "cc/resources/resource_util.h" | 20 #include "cc/resources/resource_util.h" |
| 20 #include "cc/resources/scoped_resource.h" | 21 #include "cc/resources/scoped_resource.h" |
| 21 #include "gpu/GLES2/gl2extchromium.h" | 22 #include "gpu/GLES2/gl2extchromium.h" |
| 22 #include "gpu/command_buffer/client/gles2_interface.h" | 23 #include "gpu/command_buffer/client/gles2_interface.h" |
| 23 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" | 24 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
| 24 #include "ui/gfx/buffer_format_util.h" | 25 #include "ui/gfx/buffer_format_util.h" |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 resource_lock->set_synchronized(!async_worker_context_enabled_); | 382 resource_lock->set_synchronized(!async_worker_context_enabled_); |
| 382 } | 383 } |
| 383 | 384 |
| 384 gfx::BufferUsage OneCopyRasterBufferProvider::StagingBufferUsage() const { | 385 gfx::BufferUsage OneCopyRasterBufferProvider::StagingBufferUsage() const { |
| 385 return use_partial_raster_ | 386 return use_partial_raster_ |
| 386 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT | 387 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT |
| 387 : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE; | 388 : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE; |
| 388 } | 389 } |
| 389 | 390 |
| 390 } // namespace cc | 391 } // namespace cc |
| OLD | NEW |