| 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/gpu_raster_buffer_provider.h" | 5 #include "cc/raster/gpu_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 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 // Overridden from RasterBuffer: | 39 // Overridden from RasterBuffer: |
| 40 void Playback( | 40 void Playback( |
| 41 const RasterSource* raster_source, | 41 const RasterSource* raster_source, |
| 42 const gfx::Rect& raster_full_rect, | 42 const gfx::Rect& raster_full_rect, |
| 43 const gfx::Rect& raster_dirty_rect, | 43 const gfx::Rect& raster_dirty_rect, |
| 44 uint64_t new_content_id, | 44 uint64_t new_content_id, |
| 45 float scale, | 45 float scale, |
| 46 const RasterSource::PlaybackSettings& playback_settings) override { | 46 const RasterSource::PlaybackSettings& playback_settings) override { |
| 47 TRACE_EVENT0("cc", "RasterBufferImpl::Playback"); | 47 TRACE_EVENT0("cc", "GpuRasterBuffer::Playback"); |
| 48 // GPU raster doesn't do low res tiles, so should always include images. | 48 // GPU raster doesn't do low res tiles, so should always include images. |
| 49 DCHECK(!playback_settings.skip_images); | 49 DCHECK(!playback_settings.skip_images); |
| 50 | 50 |
| 51 ContextProvider::ScopedContextLock scoped_context( | 51 ContextProvider::ScopedContextLock scoped_context( |
| 52 rasterizer_->worker_context_provider()); | 52 rasterizer_->worker_context_provider()); |
| 53 | 53 |
| 54 gfx::Rect playback_rect = raster_full_rect; | 54 gfx::Rect playback_rect = raster_full_rect; |
| 55 if (resource_has_previous_content_) { | 55 if (resource_has_previous_content_) { |
| 56 playback_rect.Intersect(raster_dirty_rect); | 56 playback_rect.Intersect(raster_dirty_rect); |
| 57 } | 57 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 bool GpuRasterBufferProvider::GetResourceRequiresSwizzle( | 127 bool GpuRasterBufferProvider::GetResourceRequiresSwizzle( |
| 128 bool must_support_alpha) const { | 128 bool must_support_alpha) const { |
| 129 // This doesn't require a swizzle because we rasterize to the correct format. | 129 // This doesn't require a swizzle because we rasterize to the correct format. |
| 130 return false; | 130 return false; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void GpuRasterBufferProvider::Shutdown() {} | 133 void GpuRasterBufferProvider::Shutdown() {} |
| 134 | 134 |
| 135 } // namespace cc | 135 } // namespace cc |
| OLD | NEW |