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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 current_canvas_(NULL) { | 81 current_canvas_(NULL) { |
82 if (resource_provider_) { | 82 if (resource_provider_) { |
83 capabilities_.max_texture_size = resource_provider_->max_texture_size(); | 83 capabilities_.max_texture_size = resource_provider_->max_texture_size(); |
84 capabilities_.best_texture_format = | 84 capabilities_.best_texture_format = |
85 resource_provider_->best_texture_format(); | 85 resource_provider_->best_texture_format(); |
86 } | 86 } |
87 // The updater can access bitmaps while the SoftwareRenderer is using them. | 87 // The updater can access bitmaps while the SoftwareRenderer is using them. |
88 capabilities_.allow_partial_texture_updates = true; | 88 capabilities_.allow_partial_texture_updates = true; |
89 capabilities_.using_partial_swap = true; | 89 capabilities_.using_partial_swap = true; |
90 | 90 |
91 capabilities_.using_map_image = true; | |
92 capabilities_.using_shared_memory_resources = true; | 91 capabilities_.using_shared_memory_resources = true; |
93 | 92 |
94 capabilities_.allow_rasterize_on_demand = true; | 93 capabilities_.allow_rasterize_on_demand = true; |
95 } | 94 } |
96 | 95 |
97 SoftwareRenderer::~SoftwareRenderer() {} | 96 SoftwareRenderer::~SoftwareRenderer() {} |
98 | 97 |
99 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const { | 98 const RendererCapabilitiesImpl& SoftwareRenderer::Capabilities() const { |
100 return capabilities_; | 99 return capabilities_; |
101 } | 100 } |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 } | 599 } |
601 | 600 |
602 void SoftwareRenderer::DidChangeVisibility() { | 601 void SoftwareRenderer::DidChangeVisibility() { |
603 if (visible()) | 602 if (visible()) |
604 EnsureBackbuffer(); | 603 EnsureBackbuffer(); |
605 else | 604 else |
606 DiscardBackbuffer(); | 605 DiscardBackbuffer(); |
607 } | 606 } |
608 | 607 |
609 } // namespace cc | 608 } // namespace cc |
OLD | NEW |