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/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 current_paint_.setFilterQuality( | 461 current_paint_.setFilterQuality( |
462 quad->nearest_neighbor ? kNone_SkFilterQuality : kLow_SkFilterQuality); | 462 quad->nearest_neighbor ? kNone_SkFilterQuality : kLow_SkFilterQuality); |
463 current_canvas_->drawBitmapRect(*lock.sk_bitmap(), uv_rect, | 463 current_canvas_->drawBitmapRect(*lock.sk_bitmap(), uv_rect, |
464 gfx::RectFToSkRect(visible_quad_vertex_rect), | 464 gfx::RectFToSkRect(visible_quad_vertex_rect), |
465 ¤t_paint_); | 465 ¤t_paint_); |
466 } | 466 } |
467 | 467 |
468 void SoftwareRenderer::DrawRenderPassQuad(const DrawingFrame* frame, | 468 void SoftwareRenderer::DrawRenderPassQuad(const DrawingFrame* frame, |
469 const RenderPassDrawQuad* quad) { | 469 const RenderPassDrawQuad* quad) { |
470 ScopedResource* content_texture = | 470 ScopedResource* content_texture = |
471 render_pass_textures_.get(quad->render_pass_id); | 471 render_pass_textures_[quad->render_pass_id].get(); |
472 DCHECK(content_texture); | 472 DCHECK(content_texture); |
473 DCHECK(content_texture->id()); | 473 DCHECK(content_texture->id()); |
474 DCHECK(IsSoftwareResource(content_texture->id())); | 474 DCHECK(IsSoftwareResource(content_texture->id())); |
475 | 475 |
476 ResourceProvider::ScopedReadLockSoftware lock(resource_provider_, | 476 ResourceProvider::ScopedReadLockSoftware lock(resource_provider_, |
477 content_texture->id()); | 477 content_texture->id()); |
478 if (!lock.valid()) | 478 if (!lock.valid()) |
479 return; | 479 return; |
480 | 480 |
481 SkRect dest_rect = gfx::RectFToSkRect(QuadVertexRect()); | 481 SkRect dest_rect = gfx::RectFToSkRect(QuadVertexRect()); |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 ApplyImageFilter(filter.get(), quad, &backdrop_bitmap); | 715 ApplyImageFilter(filter.get(), quad, &backdrop_bitmap); |
716 | 716 |
717 if (!filter_backdrop_image) | 717 if (!filter_backdrop_image) |
718 return nullptr; | 718 return nullptr; |
719 | 719 |
720 return skia::AdoptRef(filter_backdrop_image->newShader( | 720 return skia::AdoptRef(filter_backdrop_image->newShader( |
721 content_tile_mode, content_tile_mode, &filter_backdrop_transform)); | 721 content_tile_mode, content_tile_mode, &filter_backdrop_transform)); |
722 } | 722 } |
723 | 723 |
724 } // namespace cc | 724 } // namespace cc |
OLD | NEW |