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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 current_framebuffer_canvas_.reset(); | 105 current_framebuffer_canvas_.reset(); |
106 current_canvas_ = NULL; | 106 current_canvas_ = NULL; |
107 root_canvas_ = NULL; | 107 root_canvas_ = NULL; |
108 | 108 |
109 output_device_->EndPaint(); | 109 output_device_->EndPaint(); |
110 } | 110 } |
111 | 111 |
112 void SoftwareRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { | 112 void SoftwareRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { |
113 TRACE_EVENT0("cc,benchmark", "SoftwareRenderer::SwapBuffers"); | 113 TRACE_EVENT0("cc,benchmark", "SoftwareRenderer::SwapBuffers"); |
114 CompositorFrame compositor_frame; | 114 CompositorFrame compositor_frame; |
115 compositor_frame.metadata = metadata; | 115 compositor_frame.metadata = CompositorFrameMetadata(metadata); |
danakj
2016/06/24 18:35:11
dittos
Fady Samuel
2016/06/24 20:00:24
Done.
| |
116 output_surface_->SwapBuffers(&compositor_frame); | 116 output_surface_->SwapBuffers(std::move(compositor_frame)); |
117 } | 117 } |
118 | 118 |
119 bool SoftwareRenderer::FlippedFramebuffer(const DrawingFrame* frame) const { | 119 bool SoftwareRenderer::FlippedFramebuffer(const DrawingFrame* frame) const { |
120 return false; | 120 return false; |
121 } | 121 } |
122 | 122 |
123 void SoftwareRenderer::EnsureScissorTestEnabled() { | 123 void SoftwareRenderer::EnsureScissorTestEnabled() { |
124 is_scissor_enabled_ = true; | 124 is_scissor_enabled_ = true; |
125 SetClipRect(scissor_rect_); | 125 SetClipRect(scissor_rect_); |
126 } | 126 } |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
751 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); | 751 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); |
752 | 752 |
753 if (!filter_backdrop_image) | 753 if (!filter_backdrop_image) |
754 return nullptr; | 754 return nullptr; |
755 | 755 |
756 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, | 756 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, |
757 &filter_backdrop_transform); | 757 &filter_backdrop_transform); |
758 } | 758 } |
759 | 759 |
760 } // namespace cc | 760 } // namespace cc |
OLD | NEW |