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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 quad->IsLeftEdge() && | 230 quad->IsLeftEdge() && |
231 quad->IsBottomEdge() && | 231 quad->IsBottomEdge() && |
232 quad->IsRightEdge(); | 232 quad->IsRightEdge(); |
233 if (settings_->allow_antialiasing && | 233 if (settings_->allow_antialiasing && |
234 (settings_->force_antialiasing || all_four_edges_are_exterior)) | 234 (settings_->force_antialiasing || all_four_edges_are_exterior)) |
235 current_paint_.setAntiAlias(true); | 235 current_paint_.setAntiAlias(true); |
236 current_paint_.setFilterQuality(kLow_SkFilterQuality); | 236 current_paint_.setFilterQuality(kLow_SkFilterQuality); |
237 } | 237 } |
238 | 238 |
239 if (quad->ShouldDrawWithBlending() || | 239 if (quad->ShouldDrawWithBlending() || |
240 quad->shared_quad_state->blend_mode != SkXfermode::kSrcOver_Mode) { | 240 quad->shared_quad_state->blend_mode != SkBlendMode::kSrcOver) { |
241 current_paint_.setAlpha(quad->shared_quad_state->opacity * 255); | 241 current_paint_.setAlpha(quad->shared_quad_state->opacity * 255); |
242 current_paint_.setBlendMode( | 242 current_paint_.setBlendMode(quad->shared_quad_state->blend_mode); |
243 static_cast<SkBlendMode>(quad->shared_quad_state->blend_mode)); | |
244 } else { | 243 } else { |
245 current_paint_.setBlendMode(SkBlendMode::kSrc); | 244 current_paint_.setBlendMode(SkBlendMode::kSrc); |
246 } | 245 } |
247 | 246 |
248 if (draw_region) { | 247 if (draw_region) { |
249 gfx::QuadF local_draw_region(*draw_region); | 248 gfx::QuadF local_draw_region(*draw_region); |
250 SkPath draw_region_clip_path; | 249 SkPath draw_region_clip_path; |
251 local_draw_region -= | 250 local_draw_region -= |
252 gfx::Vector2dF(quad->visible_rect.x(), quad->visible_rect.y()); | 251 gfx::Vector2dF(quad->visible_rect.x(), quad->visible_rect.y()); |
253 local_draw_region.Scale(1.0f / quad->visible_rect.width(), | 252 local_draw_region.Scale(1.0f / quad->visible_rect.width(), |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); | 713 ApplyImageFilter(filter.get(), quad, backdrop_bitmap, nullptr); |
715 | 714 |
716 if (!filter_backdrop_image) | 715 if (!filter_backdrop_image) |
717 return nullptr; | 716 return nullptr; |
718 | 717 |
719 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, | 718 return filter_backdrop_image->makeShader(content_tile_mode, content_tile_mode, |
720 &filter_backdrop_transform); | 719 &filter_backdrop_transform); |
721 } | 720 } |
722 | 721 |
723 } // namespace cc | 722 } // namespace cc |
OLD | NEW |