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

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

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-cc: rebase-and-sandwich-strategy Created 5 years, 3 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/overlay_candidate.h ('k') | cc/output/overlay_strategy_sandwich.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/overlay_strategy_common.h" 5 #include "cc/output/overlay_strategy_common.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "cc/quads/io_surface_draw_quad.h" 9 #include "cc/quads/io_surface_draw_quad.h"
10 #include "cc/quads/solid_color_draw_quad.h" 10 #include "cc/quads/solid_color_draw_quad.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool OverlayStrategyCommon::GetIOSurfaceQuadInfo(const IOSurfaceDrawQuad& quad, 136 bool OverlayStrategyCommon::GetIOSurfaceQuadInfo(const IOSurfaceDrawQuad& quad,
137 OverlayCandidate* quad_info) { 137 OverlayCandidate* quad_info) {
138 gfx::OverlayTransform overlay_transform = 138 gfx::OverlayTransform overlay_transform =
139 OverlayCandidate::GetOverlayTransform( 139 OverlayCandidate::GetOverlayTransform(
140 quad.shared_quad_state->quad_to_target_transform, false); 140 quad.shared_quad_state->quad_to_target_transform, false);
141 if (overlay_transform != gfx::OVERLAY_TRANSFORM_NONE) 141 if (overlay_transform != gfx::OVERLAY_TRANSFORM_NONE)
142 return false; 142 return false;
143 quad_info->resource_id = quad.io_surface_resource_id(); 143 quad_info->resource_id = quad.io_surface_resource_id();
144 quad_info->resource_size_in_pixels = quad.io_surface_size; 144 quad_info->resource_size_in_pixels = quad.io_surface_size;
145 quad_info->transform = overlay_transform; 145 quad_info->transform = overlay_transform;
146 quad_info->uv_rect = gfx::Rect(0, 0, 1, 1); 146 quad_info->uv_rect = gfx::RectF(1.f, 1.f);
147 return true; 147 return true;
148 } 148 }
149 149
150 bool OverlayStrategyCommon::GetCandidateQuadInfo(const DrawQuad& draw_quad, 150 bool OverlayStrategyCommon::GetCandidateQuadInfo(const DrawQuad& draw_quad,
151 OverlayCandidate* quad_info) { 151 OverlayCandidate* quad_info) {
152 // All quad checks. 152 // All quad checks.
153 if (draw_quad.needs_blending || draw_quad.shared_quad_state->opacity != 1.f || 153 if (draw_quad.needs_blending || draw_quad.shared_quad_state->opacity != 1.f ||
154 draw_quad.shared_quad_state->blend_mode != SkXfermode::kSrcOver_Mode) 154 draw_quad.shared_quad_state->blend_mode != SkXfermode::kSrcOver_Mode)
155 return false; 155 return false;
156 156
(...skipping 17 matching lines...) Expand all
174 return false; 174 return false;
175 } 175 }
176 176
177 quad_info->format = RGBA_8888; 177 quad_info->format = RGBA_8888;
178 quad_info->display_rect = OverlayCandidate::GetOverlayRect( 178 quad_info->display_rect = OverlayCandidate::GetOverlayRect(
179 draw_quad.shared_quad_state->quad_to_target_transform, draw_quad.rect); 179 draw_quad.shared_quad_state->quad_to_target_transform, draw_quad.rect);
180 return true; 180 return true;
181 } 181 }
182 182
183 } // namespace cc 183 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/overlay_candidate.h ('k') | cc/output/overlay_strategy_sandwich.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698