| 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/raster/zero_copy_raster_buffer_provider.h" | 5 #include "cc/raster/zero_copy_raster_buffer_provider.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 DCHECK_GE(buffer->stride(0), 0); | 48 DCHECK_GE(buffer->stride(0), 0); |
| 49 | 49 |
| 50 // TODO(danakj): Implement partial raster with raster_dirty_rect. | 50 // TODO(danakj): Implement partial raster with raster_dirty_rect. |
| 51 RasterBufferProvider::PlaybackToMemory( | 51 RasterBufferProvider::PlaybackToMemory( |
| 52 buffer->memory(0), resource_->format(), resource_->size(), | 52 buffer->memory(0), resource_->format(), resource_->size(), |
| 53 buffer->stride(0), raster_source, raster_full_rect, raster_full_rect, | 53 buffer->stride(0), raster_source, raster_full_rect, raster_full_rect, |
| 54 scale, playback_settings); | 54 scale, playback_settings); |
| 55 buffer->Unmap(); | 55 buffer->Unmap(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void SetSyncToken(const gpu::SyncToken& sync_token) override { NOTREACHED(); } |
| 59 |
| 58 private: | 60 private: |
| 59 ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock_; | 61 ResourceProvider::ScopedWriteLockGpuMemoryBuffer lock_; |
| 60 const Resource* resource_; | 62 const Resource* resource_; |
| 61 | 63 |
| 62 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); | 64 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace | 67 } // namespace |
| 66 | 68 |
| 67 // static | 69 // static |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 113 } |
| 112 | 114 |
| 113 bool ZeroCopyRasterBufferProvider::GetResourceRequiresSwizzle( | 115 bool ZeroCopyRasterBufferProvider::GetResourceRequiresSwizzle( |
| 114 bool must_support_alpha) const { | 116 bool must_support_alpha) const { |
| 115 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); | 117 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); |
| 116 } | 118 } |
| 117 | 119 |
| 118 void ZeroCopyRasterBufferProvider::Shutdown() {} | 120 void ZeroCopyRasterBufferProvider::Shutdown() {} |
| 119 | 121 |
| 120 } // namespace cc | 122 } // namespace cc |
| OLD | NEW |