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/bitmap_raster_buffer_provider.h" | 5 #include "cc/raster/bitmap_raster_buffer_provider.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 uint64_t previous_content_id) { | 86 uint64_t previous_content_id) { |
87 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl( | 87 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl( |
88 resource_provider_, resource, resource_content_id, previous_content_id)); | 88 resource_provider_, resource, resource_content_id, previous_content_id)); |
89 } | 89 } |
90 | 90 |
91 void BitmapRasterBufferProvider::ReleaseBufferForRaster( | 91 void BitmapRasterBufferProvider::ReleaseBufferForRaster( |
92 std::unique_ptr<RasterBuffer> buffer) { | 92 std::unique_ptr<RasterBuffer> buffer) { |
93 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. | 93 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. |
94 } | 94 } |
95 | 95 |
96 void BitmapRasterBufferProvider::OrderingBarrier() { | 96 bool BitmapRasterBufferProvider::OrderingBarrier() { |
97 // No need to sync resources as this provider does not use GL context. | 97 // No need to sync resources as this provider does not use GL context. |
| 98 return true; |
98 } | 99 } |
99 | 100 |
100 ResourceFormat BitmapRasterBufferProvider::GetResourceFormat( | 101 ResourceFormat BitmapRasterBufferProvider::GetResourceFormat( |
101 bool must_support_alpha) const { | 102 bool must_support_alpha) const { |
102 return resource_provider_->best_texture_format(); | 103 return resource_provider_->best_texture_format(); |
103 } | 104 } |
104 | 105 |
105 bool BitmapRasterBufferProvider::GetResourceRequiresSwizzle( | 106 bool BitmapRasterBufferProvider::GetResourceRequiresSwizzle( |
106 bool must_support_alpha) const { | 107 bool must_support_alpha) const { |
107 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); | 108 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); |
108 } | 109 } |
109 | 110 |
110 void BitmapRasterBufferProvider::Shutdown() {} | 111 void BitmapRasterBufferProvider::Shutdown() {} |
111 | 112 |
112 } // namespace cc | 113 } // namespace cc |
OLD | NEW |