Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: cc/output/software_renderer.cc

Issue 2179003003: cc: disable denorm handling before calling into Skia's filter code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Protect orig_state_ member var with #ifdef __SSE__. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/base/math_util.cc ('k') | cc/playback/raster_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 671
672 SkImageInfo dst_info = 672 SkImageInfo dst_info =
673 SkImageInfo::MakeN32Premul(dst_rect.width(), dst_rect.height()); 673 SkImageInfo::MakeN32Premul(dst_rect.width(), dst_rect.height());
674 sk_sp<SkSurface> surface = SkSurface::MakeRaster(dst_info); 674 sk_sp<SkSurface> surface = SkSurface::MakeRaster(dst_info);
675 675
676 if (!surface) { 676 if (!surface) {
677 return nullptr; 677 return nullptr;
678 } 678 }
679 679
680 SkPaint paint; 680 SkPaint paint;
681 // Treat subnormal float values as zero for performance.
682 ScopedSubnormalFloatDisabler disabler;
681 paint.setImageFilter(filter->makeWithLocalMatrix(local_matrix)); 683 paint.setImageFilter(filter->makeWithLocalMatrix(local_matrix));
682 surface->getCanvas()->translate(-dst_rect.x(), -dst_rect.y()); 684 surface->getCanvas()->translate(-dst_rect.x(), -dst_rect.y());
683 surface->getCanvas()->drawBitmap(to_filter, quad->rect.x(), quad->rect.y(), 685 surface->getCanvas()->drawBitmap(to_filter, quad->rect.x(), quad->rect.y(),
684 &paint); 686 &paint);
685 687
686 return surface->makeImageSnapshot(); 688 return surface->makeImageSnapshot();
687 } 689 }
688 690
689 SkBitmap SoftwareRenderer::GetBackdropBitmap( 691 SkBitmap SoftwareRenderer::GetBackdropBitmap(
690 const gfx::Rect& bounding_rect) const { 692 const gfx::Rect& bounding_rect) const {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); 753 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr);
752 754
753 if (!filter_backdrop_image) 755 if (!filter_backdrop_image)
754 return nullptr; 756 return nullptr;
755 757
756 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, 758 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode,
757 &filter_backdrop_transform); 759 &filter_backdrop_transform);
758 } 760 }
759 761
760 } // namespace cc 762 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/math_util.cc ('k') | cc/playback/raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698