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

Side by Side Diff: components/exo/shell_surface.cc

Issue 2041193006: exo: Only create new SurfaceLayer if layer properties change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « components/exo/pointer.cc ('k') | components/exo/sub_surface.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/shell_surface.h" 5 #include "components/exo/shell_surface.h"
6 6
7 #include "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/wm/window_resizer.h" 9 #include "ash/common/wm/window_resizer.h"
10 #include "ash/common/wm/window_state.h" 10 #include "ash/common/wm/window_state.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 new base::trace_event::TracedValue()); 428 new base::trace_event::TracedValue());
429 value->SetString("title", base::UTF16ToUTF8(title_)); 429 value->SetString("title", base::UTF16ToUTF8(title_));
430 value->SetString("application_id", application_id_); 430 value->SetString("application_id", application_id_);
431 return value; 431 return value;
432 } 432 }
433 433
434 //////////////////////////////////////////////////////////////////////////////// 434 ////////////////////////////////////////////////////////////////////////////////
435 // SurfaceDelegate overrides: 435 // SurfaceDelegate overrides:
436 436
437 void ShellSurface::OnSurfaceCommit() { 437 void ShellSurface::OnSurfaceCommit() {
438 surface_->CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces();
438 surface_->CommitSurfaceHierarchy(); 439 surface_->CommitSurfaceHierarchy();
439 440
440 if (enabled() && !widget_) 441 if (enabled() && !widget_)
441 CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL); 442 CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL);
442 443
443 // Apply the accumulated pending origin offset to reflect acknowledged 444 // Apply the accumulated pending origin offset to reflect acknowledged
444 // configure requests. 445 // configure requests.
445 origin_ += pending_origin_offset_; 446 origin_ += pending_origin_offset_;
446 pending_origin_offset_ = gfx::Vector2d(); 447 pending_origin_offset_ = gfx::Vector2d();
447 448
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 if (widget_->GetNativeWindow()->bounds() != new_widget_bounds) 1020 if (widget_->GetNativeWindow()->bounds() != new_widget_bounds)
1020 widget_->SetBounds(new_widget_bounds); 1021 widget_->SetBounds(new_widget_bounds);
1021 ignore_window_bounds_changes_ = false; 1022 ignore_window_bounds_changes_ = false;
1022 1023
1023 // A change to the widget size requires surface bounds to be re-adjusted. 1024 // A change to the widget size requires surface bounds to be re-adjusted.
1024 surface_->window()->SetBounds( 1025 surface_->window()->SetBounds(
1025 gfx::Rect(GetSurfaceOrigin(), surface_->window()->layer()->size())); 1026 gfx::Rect(GetSurfaceOrigin(), surface_->window()->layer()->size()));
1026 } 1027 }
1027 1028
1028 } // namespace exo 1029 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/pointer.cc ('k') | components/exo/sub_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698