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/memory/ptr_util.h" |
14 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
15 #include "base/trace_event/trace_event.h" | 16 #include "base/trace_event/trace_event.h" |
16 #include "cc/base/histograms.h" | 17 #include "cc/base/histograms.h" |
17 #include "cc/base/math_util.h" | 18 #include "cc/base/math_util.h" |
18 #include "cc/resources/platform_color.h" | 19 #include "cc/resources/platform_color.h" |
19 #include "cc/resources/resource_format.h" | 20 #include "cc/resources/resource_format.h" |
20 #include "cc/resources/resource_util.h" | 21 #include "cc/resources/resource_util.h" |
21 #include "cc/resources/scoped_resource.h" | 22 #include "cc/resources/scoped_resource.h" |
22 #include "gpu/GLES2/gl2extchromium.h" | 23 #include "gpu/GLES2/gl2extchromium.h" |
23 #include "gpu/command_buffer/client/gles2_interface.h" | 24 #include "gpu/command_buffer/client/gles2_interface.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 resource_lock->set_synchronized(!async_worker_context_enabled_); | 386 resource_lock->set_synchronized(!async_worker_context_enabled_); |
386 } | 387 } |
387 | 388 |
388 gfx::BufferUsage OneCopyRasterBufferProvider::StagingBufferUsage() const { | 389 gfx::BufferUsage OneCopyRasterBufferProvider::StagingBufferUsage() const { |
389 return use_partial_raster_ | 390 return use_partial_raster_ |
390 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT | 391 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT |
391 : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE; | 392 : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE; |
392 } | 393 } |
393 | 394 |
394 } // namespace cc | 395 } // namespace cc |
OLD | NEW |