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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 resource_provider_->best_texture_format(); | 71 resource_provider_->best_texture_format(); |
72 } | 72 } |
73 capabilities_.using_set_visibility = true; | 73 capabilities_.using_set_visibility = true; |
74 // The updater can access bitmaps while the SoftwareRenderer is using them. | 74 // The updater can access bitmaps while the SoftwareRenderer is using them. |
75 capabilities_.allow_partial_texture_updates = true; | 75 capabilities_.allow_partial_texture_updates = true; |
76 capabilities_.using_partial_swap = true; | 76 capabilities_.using_partial_swap = true; |
77 | 77 |
78 capabilities_.using_map_image = | 78 capabilities_.using_map_image = |
79 Settings().use_map_image && | 79 Settings().use_map_image && |
80 output_surface->capabilities().deferred_gl_initialization; | 80 output_surface->capabilities().deferred_gl_initialization; |
| 81 capabilities_.using_shared_memory_resources = true; |
81 } | 82 } |
82 | 83 |
83 SoftwareRenderer::~SoftwareRenderer() {} | 84 SoftwareRenderer::~SoftwareRenderer() {} |
84 | 85 |
85 const RendererCapabilities& SoftwareRenderer::Capabilities() const { | 86 const RendererCapabilities& SoftwareRenderer::Capabilities() const { |
86 return capabilities_; | 87 return capabilities_; |
87 } | 88 } |
88 | 89 |
89 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { | 90 void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { |
90 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame"); | 91 TRACE_EVENT0("cc", "SoftwareRenderer::BeginDrawingFrame"); |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 visible_ = visible; | 491 visible_ = visible; |
491 } | 492 } |
492 | 493 |
493 void SoftwareRenderer::SetDiscardBackBufferWhenNotVisible(bool discard) { | 494 void SoftwareRenderer::SetDiscardBackBufferWhenNotVisible(bool discard) { |
494 // TODO(piman, skaslev): Can we release the backbuffer? We don't currently | 495 // TODO(piman, skaslev): Can we release the backbuffer? We don't currently |
495 // receive memory policy yet anyway. | 496 // receive memory policy yet anyway. |
496 NOTIMPLEMENTED(); | 497 NOTIMPLEMENTED(); |
497 } | 498 } |
498 | 499 |
499 } // namespace cc | 500 } // namespace cc |
OLD | NEW |