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

Side by Side Diff: ui/aura/desktop.cc

Issue 8800030: Fix assert with webkit compositor. The assert was hitting because we (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Spacing and comment Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura/desktop.h" 5 #include "ui/aura/desktop.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 ui::CompositorCC::Initialize(false); 422 ui::CompositorCC::Initialize(false);
423 #endif 423 #endif
424 compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(), 424 compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(),
425 host_->GetSize()); 425 host_->GetSize());
426 } 426 }
427 DCHECK(compositor_.get()); 427 DCHECK(compositor_.get());
428 } 428 }
429 429
430 Desktop::~Desktop() { 430 Desktop::~Desktop() {
431 in_destructor_ = true; 431 in_destructor_ = true;
432 // Make sure to destroy the compositor before terminating so that state is
433 // cleared and we don't hit asserts.
434 compositor_ = NULL;
432 #ifdef USE_WEBKIT_COMPOSITOR 435 #ifdef USE_WEBKIT_COMPOSITOR
433 if (!ui::Compositor::compositor_factory()) 436 if (!ui::Compositor::compositor_factory())
434 ui::CompositorCC::Terminate(); 437 ui::CompositorCC::Terminate();
435 #endif 438 #endif
436 if (instance_ == this) 439 if (instance_ == this)
437 instance_ = NULL; 440 instance_ = NULL;
438 } 441 }
439 442
440 void Desktop::HandleMouseMoved(const MouseEvent& event, Window* target) { 443 void Desktop::HandleMouseMoved(const MouseEvent& event, Window* target) {
441 if (target == mouse_moved_handler_) 444 if (target == mouse_moved_handler_)
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { 602 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
600 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 603 bounds.set_size(gfx::Size(parsed_width, parsed_height));
601 } else if (use_fullscreen_host_window_) { 604 } else if (use_fullscreen_host_window_) {
602 bounds = gfx::Rect(DesktopHost::GetNativeScreenSize()); 605 bounds = gfx::Rect(DesktopHost::GetNativeScreenSize());
603 } 606 }
604 607
605 return bounds; 608 return bounds;
606 } 609 }
607 610
608 } // namespace aura 611 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698