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

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

Issue 1414923006: Revert of Avoid Copying damage rect when using Overlays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_processor.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_candidate.h" 5 #include "cc/output/overlay_candidate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 auto& transform = quad->shared_quad_state->quad_to_target_transform; 190 auto& transform = quad->shared_quad_state->quad_to_target_transform;
191 candidate->display_rect = gfx::RectF(quad->rect); 191 candidate->display_rect = gfx::RectF(quad->rect);
192 transform.TransformRect(&candidate->display_rect); 192 transform.TransformRect(&candidate->display_rect);
193 candidate->quad_rect_in_target_space = 193 candidate->quad_rect_in_target_space =
194 MathUtil::MapEnclosingClippedRect(transform, quad->rect); 194 MathUtil::MapEnclosingClippedRect(transform, quad->rect);
195 195
196 candidate->format = RGBA_8888; 196 candidate->format = RGBA_8888;
197 candidate->clip_rect = quad->shared_quad_state->clip_rect; 197 candidate->clip_rect = quad->shared_quad_state->clip_rect;
198 candidate->is_clipped = quad->shared_quad_state->is_clipped; 198 candidate->is_clipped = quad->shared_quad_state->is_clipped;
199 candidate->needs_blending =
200 quad->shared_quad_state->opacity < 1.0f || quad->needs_blending;
201 199
202 switch (quad->material) { 200 switch (quad->material) {
203 case DrawQuad::TEXTURE_CONTENT: 201 case DrawQuad::TEXTURE_CONTENT:
204 return FromTextureQuad(resource_provider, 202 return FromTextureQuad(resource_provider,
205 TextureDrawQuad::MaterialCast(quad), candidate); 203 TextureDrawQuad::MaterialCast(quad), candidate);
206 case DrawQuad::STREAM_VIDEO_CONTENT: 204 case DrawQuad::STREAM_VIDEO_CONTENT:
207 return FromStreamVideoQuad(resource_provider, 205 return FromStreamVideoQuad(resource_provider,
208 StreamVideoDrawQuad::MaterialCast(quad), 206 StreamVideoDrawQuad::MaterialCast(quad),
209 candidate); 207 candidate);
210 case DrawQuad::IO_SURFACE_CONTENT: 208 case DrawQuad::IO_SURFACE_CONTENT:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (overlay_transform != gfx::OVERLAY_TRANSFORM_NONE) 303 if (overlay_transform != gfx::OVERLAY_TRANSFORM_NONE)
306 return false; 304 return false;
307 candidate->resource_id = quad->io_surface_resource_id(); 305 candidate->resource_id = quad->io_surface_resource_id();
308 candidate->resource_size_in_pixels = quad->io_surface_size; 306 candidate->resource_size_in_pixels = quad->io_surface_size;
309 candidate->transform = overlay_transform; 307 candidate->transform = overlay_transform;
310 candidate->uv_rect = gfx::RectF(1.f, 1.f); 308 candidate->uv_rect = gfx::RectF(1.f, 1.f);
311 return true; 309 return true;
312 } 310 }
313 311
314 } // namespace cc 312 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/overlay_candidate.h ('k') | cc/output/overlay_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698