| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 void BitmapRasterBufferProvider::ReleaseBufferForRaster( | 96 void BitmapRasterBufferProvider::ReleaseBufferForRaster( |
| 97 std::unique_ptr<RasterBuffer> buffer) { | 97 std::unique_ptr<RasterBuffer> buffer) { |
| 98 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. | 98 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. |
| 99 } | 99 } |
| 100 | 100 |
| 101 void BitmapRasterBufferProvider::OrderingBarrier() { | 101 void BitmapRasterBufferProvider::OrderingBarrier() { |
| 102 // No need to sync resources as this provider does not use GL context. | 102 // No need to sync resources as this provider does not use GL context. |
| 103 } | 103 } |
| 104 | 104 |
| 105 bool BitmapRasterBufferProvider::IsResourceReadyToDraw( |
| 106 const Resource* resource) { |
| 107 return resource; |
| 108 } |
| 109 |
| 110 void BitmapRasterBufferProvider::SignalResourcesReadyToDraw( |
| 111 const std::vector<const Resource*>& resources, |
| 112 const base::Closure& callback) { |
| 113 if (!callback.is_null()) |
| 114 callback.Run(); |
| 115 } |
| 116 |
| 105 ResourceFormat BitmapRasterBufferProvider::GetResourceFormat( | 117 ResourceFormat BitmapRasterBufferProvider::GetResourceFormat( |
| 106 bool must_support_alpha) const { | 118 bool must_support_alpha) const { |
| 107 return resource_provider_->best_texture_format(); | 119 return resource_provider_->best_texture_format(); |
| 108 } | 120 } |
| 109 | 121 |
| 110 bool BitmapRasterBufferProvider::IsResourceSwizzleRequired( | 122 bool BitmapRasterBufferProvider::IsResourceSwizzleRequired( |
| 111 bool must_support_alpha) const { | 123 bool must_support_alpha) const { |
| 112 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); | 124 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); |
| 113 } | 125 } |
| 114 | 126 |
| 115 bool BitmapRasterBufferProvider::CanPartialRasterIntoProvidedResource() const { | 127 bool BitmapRasterBufferProvider::CanPartialRasterIntoProvidedResource() const { |
| 116 return true; | 128 return true; |
| 117 } | 129 } |
| 118 | 130 |
| 119 void BitmapRasterBufferProvider::Shutdown() {} | 131 void BitmapRasterBufferProvider::Shutdown() {} |
| 120 | 132 |
| 121 } // namespace cc | 133 } // namespace cc |
| OLD | NEW |