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

Unified Diff: cc/layers/surface_layer.cc

Issue 2495373003: Match html canvas which is transferred to OffscreenCanvas to CSS style (Closed)
Patch Set: fix Created 4 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/surface_layer.cc
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc
index 0f8bd3380be1aa873bf5ed197dcafabad45a9c51..7c46d8410d2950dbb92c5a3c3f63fd86a7d7807d 100644
--- a/cc/layers/surface_layer.cc
+++ b/cc/layers/surface_layer.cc
@@ -62,11 +62,13 @@ SurfaceLayer::~SurfaceLayer() {
void SurfaceLayer::SetSurfaceId(const SurfaceId& surface_id,
float scale,
- const gfx::Size& size) {
+ const gfx::Size& size,
+ bool scale_layer_bounds_with_surface_size) {
SatisfyDestroySequence();
surface_id_ = surface_id;
surface_size_ = size;
surface_scale_ = scale;
+ scale_layer_bounds_with_surface_size_ = scale_layer_bounds_with_surface_size;
CreateNewDestroySequence();
UpdateDrawsContent(HasDrawableContent());
@@ -101,6 +103,8 @@ void SurfaceLayer::PushPropertiesTo(LayerImpl* layer) {
layer_impl->SetSurfaceId(surface_id_);
layer_impl->SetSurfaceSize(surface_size_);
layer_impl->SetSurfaceScale(surface_scale_);
+ layer_impl->SetScaleLayerBoundsWithSurfaceSize(
+ scale_layer_bounds_with_surface_size_);
}
void SurfaceLayer::CreateNewDestroySequence() {

Powered by Google App Engine
This is Rietveld 408576698