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/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) { | 73 void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) { |
74 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame"); | 74 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame"); |
75 current_framebuffer_lock_ = nullptr; | 75 current_framebuffer_lock_ = nullptr; |
76 current_framebuffer_canvas_.reset(); | 76 current_framebuffer_canvas_.reset(); |
77 current_canvas_ = nullptr; | 77 current_canvas_ = nullptr; |
78 root_canvas_ = nullptr; | 78 root_canvas_ = nullptr; |
79 | 79 |
80 output_device_->EndPaint(); | 80 output_device_->EndPaint(); |
81 } | 81 } |
82 | 82 |
83 void SoftwareRenderer::SwapBuffers(std::vector<ui::LatencyInfo> latency_info) { | 83 void SoftwareRenderer::SwapBuffers(OutputSurfaceFrame output_frame) { |
84 DCHECK(visible_); | 84 DCHECK(visible_); |
85 TRACE_EVENT0("cc", "SoftwareRenderer::SwapBuffers"); | 85 TRACE_EVENT0("cc", "SoftwareRenderer::SwapBuffers"); |
86 OutputSurfaceFrame output_frame; | |
87 output_frame.latency_info = std::move(latency_info); | |
88 output_surface_->SwapBuffers(std::move(output_frame)); | 86 output_surface_->SwapBuffers(std::move(output_frame)); |
89 } | 87 } |
90 | 88 |
91 bool SoftwareRenderer::FlippedFramebuffer(const DrawingFrame* frame) const { | 89 bool SoftwareRenderer::FlippedFramebuffer(const DrawingFrame* frame) const { |
92 return false; | 90 return false; |
93 } | 91 } |
94 | 92 |
95 void SoftwareRenderer::EnsureScissorTestEnabled() { | 93 void SoftwareRenderer::EnsureScissorTestEnabled() { |
96 is_scissor_enabled_ = true; | 94 is_scissor_enabled_ = true; |
97 SetClipRect(scissor_rect_); | 95 SetClipRect(scissor_rect_); |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); | 710 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); |
713 | 711 |
714 if (!filter_backdrop_image) | 712 if (!filter_backdrop_image) |
715 return nullptr; | 713 return nullptr; |
716 | 714 |
717 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, | 715 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, |
718 &filter_backdrop_transform); | 716 &filter_backdrop_transform); |
719 } | 717 } |
720 | 718 |
721 } // namespace cc | 719 } // namespace cc |
OLD | NEW |