| 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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 capabilities_.max_texture_size = resource_provider_->max_texture_size(); | 85 capabilities_.max_texture_size = resource_provider_->max_texture_size(); |
| 86 capabilities_.best_texture_format = | 86 capabilities_.best_texture_format = |
| 87 resource_provider_->best_texture_format(); | 87 resource_provider_->best_texture_format(); |
| 88 } | 88 } |
| 89 // The updater can access bitmaps while the SoftwareRenderer is using them. | 89 // The updater can access bitmaps while the SoftwareRenderer is using them. |
| 90 capabilities_.allow_partial_texture_updates = true; | 90 capabilities_.allow_partial_texture_updates = true; |
| 91 capabilities_.using_partial_swap = true; | 91 capabilities_.using_partial_swap = true; |
| 92 | 92 |
| 93 capabilities_.using_map_image = settings_->use_map_image; | 93 capabilities_.using_map_image = settings_->use_map_image; |
| 94 capabilities_.using_shared_memory_resources = true; | 94 capabilities_.using_shared_memory_resources = true; |
| 95 |
| 96 capabilities_.allow_rasterize_on_demand = true; |
| 95 } | 97 } |
| 96 | 98 |
| 97 SoftwareRenderer::~SoftwareRenderer() {} | 99 SoftwareRenderer::~SoftwareRenderer() {} |
| 98 | 100 |
| 99 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const { | 101 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const { |
| 100 return capabilities_; | 102 return capabilities_; |
| 101 } | 103 } |
| 102 | 104 |
| 103 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { | 105 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { |
| 104 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame"); | 106 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame"); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 return; | 612 return; |
| 611 visible_ = visible; | 613 visible_ = visible; |
| 612 | 614 |
| 613 if (visible_) | 615 if (visible_) |
| 614 EnsureBackbuffer(); | 616 EnsureBackbuffer(); |
| 615 else | 617 else |
| 616 DiscardBackbuffer(); | 618 DiscardBackbuffer(); |
| 617 } | 619 } |
| 618 | 620 |
| 619 } // namespace cc | 621 } // namespace cc |
| OLD | NEW |