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/base/render_surface_filters.h" | 10 #include "cc/base/render_surface_filters.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 | 576 |
577 std::unique_ptr<SkBitmap> bitmap(new SkBitmap); | 577 std::unique_ptr<SkBitmap> bitmap(new SkBitmap); |
578 bitmap->setInfo(SkImageInfo::MakeN32Premul(window_copy_rect.width(), | 578 bitmap->setInfo(SkImageInfo::MakeN32Premul(window_copy_rect.width(), |
579 window_copy_rect.height())); | 579 window_copy_rect.height())); |
580 current_canvas_->readPixels( | 580 current_canvas_->readPixels( |
581 bitmap.get(), window_copy_rect.x(), window_copy_rect.y()); | 581 bitmap.get(), window_copy_rect.x(), window_copy_rect.y()); |
582 | 582 |
583 request->SendBitmapResult(std::move(bitmap)); | 583 request->SendBitmapResult(std::move(bitmap)); |
584 } | 584 } |
585 | 585 |
| 586 void SoftwareRenderer::SetEnableDCLayers(bool enable) { |
| 587 NOTIMPLEMENTED(); |
| 588 } |
| 589 |
586 void SoftwareRenderer::DidChangeVisibility() { | 590 void SoftwareRenderer::DidChangeVisibility() { |
587 if (visible_) | 591 if (visible_) |
588 output_surface_->EnsureBackbuffer(); | 592 output_surface_->EnsureBackbuffer(); |
589 else | 593 else |
590 output_surface_->DiscardBackbuffer(); | 594 output_surface_->DiscardBackbuffer(); |
591 } | 595 } |
592 | 596 |
593 bool SoftwareRenderer::ShouldApplyBackgroundFilters( | 597 bool SoftwareRenderer::ShouldApplyBackgroundFilters( |
594 const RenderPassDrawQuad* quad, | 598 const RenderPassDrawQuad* quad, |
595 const FilterOperations* background_filters) const { | 599 const FilterOperations* background_filters) const { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); | 723 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); |
720 | 724 |
721 if (!filter_backdrop_image) | 725 if (!filter_backdrop_image) |
722 return nullptr; | 726 return nullptr; |
723 | 727 |
724 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, | 728 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, |
725 &filter_backdrop_transform); | 729 &filter_backdrop_transform); |
726 } | 730 } |
727 | 731 |
728 } // namespace cc | 732 } // namespace cc |
OLD | NEW |