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

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

Issue 2849953004: SV Test
Patch Set: Created 3 years, 7 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 | « ash/system/tray/system_tray.cc ('k') | cc/raster/raster_source.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/layers/surface_layer_impl.h" 5 #include "cc/layers/surface_layer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 static_cast<float>(surface_info.size_in_pixels().width()) / 98 static_cast<float>(surface_info.size_in_pixels().width()) /
99 bounds().width(); 99 bounds().width();
100 layer_to_content_scale_y = 100 layer_to_content_scale_y =
101 static_cast<float>(surface_info.size_in_pixels().height()) / 101 static_cast<float>(surface_info.size_in_pixels().height()) /
102 bounds().height(); 102 bounds().height();
103 } else { 103 } else {
104 layer_to_content_scale_x = layer_to_content_scale_y = 104 layer_to_content_scale_x = layer_to_content_scale_y =
105 surface_info.device_scale_factor(); 105 surface_info.device_scale_factor();
106 } 106 }
107 107
108 visible_quad_rect = gfx::ScaleToEnclosedRect( 108 visible_quad_rect = gfx::ScaleToEnclosingRect(
109 visible_quad_rect, layer_to_content_scale_x, layer_to_content_scale_y); 109 visible_quad_rect, layer_to_content_scale_x, layer_to_content_scale_y);
110 visible_quad_rect = gfx::IntersectRects(quad_rect, visible_quad_rect); 110 visible_quad_rect = gfx::IntersectRects(quad_rect, visible_quad_rect);
111 111
112 if (visible_quad_rect.IsEmpty()) 112 if (visible_quad_rect.IsEmpty())
113 return nullptr; 113 return nullptr;
114 114
115 SharedQuadState* shared_quad_state = 115 SharedQuadState* shared_quad_state =
116 render_pass->CreateAndAppendSharedQuadState(); 116 render_pass->CreateAndAppendSharedQuadState();
117 PopulateScaledSharedQuadState(shared_quad_state, layer_to_content_scale_x, 117 PopulateScaledSharedQuadState(shared_quad_state, layer_to_content_scale_x,
118 layer_to_content_scale_y); 118 layer_to_content_scale_y);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 dict->SetString("surface_id", primary_surface_info_.id().ToString()); 226 dict->SetString("surface_id", primary_surface_info_.id().ToString());
227 dict->SetString("fallback_surface_id", 227 dict->SetString("fallback_surface_id",
228 fallback_surface_info_.id().ToString()); 228 fallback_surface_info_.id().ToString());
229 } 229 }
230 230
231 const char* SurfaceLayerImpl::LayerTypeAsString() const { 231 const char* SurfaceLayerImpl::LayerTypeAsString() const {
232 return "cc::SurfaceLayerImpl"; 232 return "cc::SurfaceLayerImpl";
233 } 233 }
234 234
235 } // namespace cc 235 } // namespace cc
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | cc/raster/raster_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698