summaryrefslogtreecommitdiffstats
path: root/aura/desktop.cc
blob: 005545098d5d400854824c6ba641d70fd2f9d240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "aura/desktop.h"

#include "aura/window.h"
#include "base/logging.h"
#include "ui/gfx/compositor/compositor.h"

namespace aura {

Desktop::Desktop(gfx::AcceleratedWidget widget, const gfx::Size& size)
    : compositor_(ui::Compositor::Create(widget, size)) {
  DCHECK(compositor_.get());
  window_.reset(new Window(this));
}

Desktop::~Desktop() {
}

void Desktop::Draw() {
  // Second pass renders the layers.
  compositor_->NotifyStart();
  window_->DrawTree();
  compositor_->NotifyEnd();
}

}  // namespace aura