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

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

Issue 2495373003: Match html canvas which is transferred to OffscreenCanvas to CSS style (Closed)
Patch Set: fix compilation error Created 4 years 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 render_pass, bounds(), shared_quad_state, append_quads_data); 195 render_pass, bounds(), shared_quad_state, append_quads_data);
196 196
197 SolidColorLayerImpl::AppendSolidQuads( 197 SolidColorLayerImpl::AppendSolidQuads(
198 render_pass, draw_properties().occlusion_in_content_space, 198 render_pass, draw_properties().occlusion_in_content_space,
199 shared_quad_state, visible_layer_rect(), 199 shared_quad_state, visible_layer_rect(),
200 raster_source_->GetSolidColor(), append_quads_data); 200 raster_source_->GetSolidColor(), append_quads_data);
201 return; 201 return;
202 } 202 }
203 203
204 float max_contents_scale = MaximumTilingContentsScale(); 204 float max_contents_scale = MaximumTilingContentsScale();
205 PopulateScaledSharedQuadState(shared_quad_state, max_contents_scale); 205 PopulateScaledSharedQuadState(shared_quad_state, max_contents_scale,
206 max_contents_scale);
206 Occlusion scaled_occlusion = 207 Occlusion scaled_occlusion =
207 draw_properties() 208 draw_properties()
208 .occlusion_in_content_space.GetOcclusionWithGivenDrawTransform( 209 .occlusion_in_content_space.GetOcclusionWithGivenDrawTransform(
209 shared_quad_state->quad_to_target_transform); 210 shared_quad_state->quad_to_target_transform);
210 211
211 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) { 212 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) {
212 AppendDebugBorderQuad( 213 AppendDebugBorderQuad(
213 render_pass, shared_quad_state->quad_layer_bounds, shared_quad_state, 214 render_pass, shared_quad_state->quad_layer_bounds, shared_quad_state,
214 append_quads_data, DebugColors::DirectPictureBorderColor(), 215 append_quads_data, DebugColors::DirectPictureBorderColor(),
215 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); 216 DebugColors::DirectPictureBorderWidth(layer_tree_impl()));
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1343 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1343 return !layer_tree_impl()->IsRecycleTree(); 1344 return !layer_tree_impl()->IsRecycleTree();
1344 } 1345 }
1345 1346
1346 bool PictureLayerImpl::HasValidTilePriorities() const { 1347 bool PictureLayerImpl::HasValidTilePriorities() const {
1347 return IsOnActiveOrPendingTree() && 1348 return IsOnActiveOrPendingTree() &&
1348 is_drawn_render_surface_layer_list_member(); 1349 is_drawn_render_surface_layer_list_member();
1349 } 1350 }
1350 1351
1351 } // namespace cc 1352 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698