| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 DCHECK(!playback_rect.IsEmpty()) | 49 DCHECK(!playback_rect.IsEmpty()) |
| 50 << "Why are we rastering a tile that's not dirty?"; | 50 << "Why are we rastering a tile that's not dirty?"; |
| 51 | 51 |
| 52 size_t stride = 0u; | 52 size_t stride = 0u; |
| 53 RasterBufferProvider::PlaybackToMemory( | 53 RasterBufferProvider::PlaybackToMemory( |
| 54 lock_.sk_bitmap().getPixels(), resource_->format(), resource_->size(), | 54 lock_.sk_bitmap().getPixels(), resource_->format(), resource_->size(), |
| 55 stride, raster_source, raster_full_rect, playback_rect, scale, | 55 stride, raster_source, raster_full_rect, playback_rect, scale, |
| 56 playback_settings); | 56 playback_settings); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void SetSyncToken(const gpu::SyncToken& sync_token) override { NOTREACHED(); } |
| 60 |
| 59 private: | 61 private: |
| 60 ResourceProvider::ScopedWriteLockSoftware lock_; | 62 ResourceProvider::ScopedWriteLockSoftware lock_; |
| 61 const Resource* resource_; | 63 const Resource* resource_; |
| 62 bool resource_has_previous_content_; | 64 bool resource_has_previous_content_; |
| 63 | 65 |
| 64 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); | 66 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 } // namespace | 69 } // namespace |
| 68 | 70 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 105 } |
| 104 | 106 |
| 105 bool BitmapRasterBufferProvider::GetResourceRequiresSwizzle( | 107 bool BitmapRasterBufferProvider::GetResourceRequiresSwizzle( |
| 106 bool must_support_alpha) const { | 108 bool must_support_alpha) const { |
| 107 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); | 109 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); |
| 108 } | 110 } |
| 109 | 111 |
| 110 void BitmapRasterBufferProvider::Shutdown() {} | 112 void BitmapRasterBufferProvider::Shutdown() {} |
| 111 | 113 |
| 112 } // namespace cc | 114 } // namespace cc |
| OLD | NEW |