| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/output/software_renderer.h" | 5 #include "cc/output/software_renderer.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 SoftwareRenderer::SoftwareRenderer(const RendererSettings* settings, | 56 SoftwareRenderer::SoftwareRenderer(const RendererSettings* settings, |
| 57 OutputSurface* output_surface, | 57 OutputSurface* output_surface, |
| 58 ResourceProvider* resource_provider) | 58 ResourceProvider* resource_provider) |
| 59 : DirectRenderer(settings, output_surface, resource_provider), | 59 : DirectRenderer(settings, output_surface, resource_provider), |
| 60 output_device_(output_surface->software_device()) { | 60 output_device_(output_surface->software_device()) { |
| 61 if (resource_provider_) { | 61 if (resource_provider_) { |
| 62 capabilities_.max_texture_size = resource_provider_->max_texture_size(); | 62 capabilities_.max_texture_size = resource_provider_->max_texture_size(); |
| 63 capabilities_.best_texture_format = | 63 capabilities_.best_texture_format = |
| 64 resource_provider_->best_texture_format(); | 64 resource_provider_->best_texture_format(); |
| 65 } | 65 } |
| 66 capabilities_.using_shared_memory_resources = true; | |
| 67 } | 66 } |
| 68 | 67 |
| 69 SoftwareRenderer::~SoftwareRenderer() {} | 68 SoftwareRenderer::~SoftwareRenderer() {} |
| 70 | 69 |
| 71 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const { | 70 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const { |
| 72 return capabilities_; | 71 return capabilities_; |
| 73 } | 72 } |
| 74 | 73 |
| 75 bool SoftwareRenderer::CanPartialSwap() { | 74 bool SoftwareRenderer::CanPartialSwap() { |
| 76 return true; | 75 return true; |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); | 718 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); |
| 720 | 719 |
| 721 if (!filter_backdrop_image) | 720 if (!filter_backdrop_image) |
| 722 return nullptr; | 721 return nullptr; |
| 723 | 722 |
| 724 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, | 723 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, |
| 725 &filter_backdrop_transform); | 724 &filter_backdrop_transform); |
| 726 } | 725 } |
| 727 | 726 |
| 728 } // namespace cc | 727 } // namespace cc |
| OLD | NEW |