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

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

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: Fix MSVC build issue Created 4 years, 11 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/output/gl_renderer.cc ('k') | cc/quads/render_pass.h » ('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/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
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 &current_paint_); 465 &current_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
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
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/quads/render_pass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698