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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 1174733003: cc, gpu: Use RGBA when using msaa on systems that don't support BGRA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove test code Created 5 years, 6 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 | « no previous file | cc/raster/gpu_rasterizer.h » ('j') | cc/raster/gpu_tile_task_worker_pool.cc » ('J')
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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // the best the layer can promise in the future, consider those as 287 // the best the layer can promise in the future, consider those as
288 // complete. But if a tile is ideal scale, we don't want to consider 288 // complete. But if a tile is ideal scale, we don't want to consider
289 // it incomplete and trying to replace it with a tile at a worse 289 // it incomplete and trying to replace it with a tile at a worse
290 // scale. 290 // scale.
291 if (iter->contents_scale() != raster_contents_scale_ && 291 if (iter->contents_scale() != raster_contents_scale_ &&
292 iter->contents_scale() != ideal_contents_scale_ && 292 iter->contents_scale() != ideal_contents_scale_ &&
293 geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { 293 geometry_rect.Intersects(scaled_viewport_for_tile_priority)) {
294 append_quads_data->num_incomplete_tiles++; 294 append_quads_data->num_incomplete_tiles++;
295 } 295 }
296 296
297 // Only swizzle contents for software rasterization, where texture
298 // uploads require it.
299 bool swizzle_contents = !layer_tree_impl()->use_gpu_rasterization() &&
300 draw_info.contents_swizzled();
297 TileDrawQuad* quad = 301 TileDrawQuad* quad =
298 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); 302 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>();
299 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect, 303 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect,
300 visible_geometry_rect, draw_info.resource_id(), 304 visible_geometry_rect, draw_info.resource_id(),
301 texture_rect, draw_info.resource_size(), 305 texture_rect, draw_info.resource_size(),
302 draw_info.contents_swizzled(), nearest_neighbor_); 306 swizzle_contents, nearest_neighbor_);
303 ValidateQuadResources(quad); 307 ValidateQuadResources(quad);
304 has_draw_quad = true; 308 has_draw_quad = true;
305 break; 309 break;
306 } 310 }
307 case TileDrawInfo::SOLID_COLOR_MODE: { 311 case TileDrawInfo::SOLID_COLOR_MODE: {
308 SolidColorDrawQuad* quad = 312 SolidColorDrawQuad* quad =
309 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); 313 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
310 quad->SetNew(shared_quad_state, geometry_rect, visible_geometry_rect, 314 quad->SetNew(shared_quad_state, geometry_rect, visible_geometry_rect,
311 draw_info.solid_color(), false); 315 draw_info.solid_color(), false);
312 ValidateQuadResources(quad); 316 ValidateQuadResources(quad);
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1231
1228 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1232 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1229 return !layer_tree_impl()->IsRecycleTree(); 1233 return !layer_tree_impl()->IsRecycleTree();
1230 } 1234 }
1231 1235
1232 bool PictureLayerImpl::HasValidTilePriorities() const { 1236 bool PictureLayerImpl::HasValidTilePriorities() const {
1233 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1237 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1234 } 1238 }
1235 1239
1236 } // namespace cc 1240 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/raster/gpu_rasterizer.h » ('j') | cc/raster/gpu_tile_task_worker_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698