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

Side by Side Diff: services/gfx/compositor/render/render_frame.cc

Issue 1552963002: Initial checkin of the new Mozart compositor. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-11
Patch Set: fix android build Created 4 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "services/gfx/compositor/render/render_frame.h"
6
7 #include "base/logging.h"
8 #include "services/gfx/compositor/render/render_layer.h"
9 #include "skia/ext/refptr.h"
10 #include "third_party/skia/include/core/SkCanvas.h"
11 #include "third_party/skia/include/core/SkPicture.h"
12 #include "third_party/skia/include/core/SkPoint.h"
13
14 namespace compositor {
15
16 RenderFrame::RenderFrame(const std::shared_ptr<RenderLayer>& root_layer,
17 const SkRect& viewport,
18 const mojo::gfx::composition::FrameInfo& frame_info)
19 : root_layer_(root_layer), viewport_(viewport), frame_info_(frame_info) {
20 DCHECK(root_layer_);
21 }
22
23 RenderFrame::~RenderFrame() {}
24
25 void RenderFrame::Paint(SkCanvas* canvas) const {
26 // TODO: Consider using GrDrawContext instead of SkCanvas.
27 canvas->clear(SK_ColorBLACK);
28 canvas->drawPicture(root_layer_->picture().get());
29 canvas->flush();
30 }
31
32 mojo::gfx::composition::HitTestResultPtr RenderFrame::HitTest(
33 const SkPoint& point) const {
34 // TODO: implement me
35 auto result = mojo::gfx::composition::HitTestResult::New();
36 result->hits.resize(0u);
37 return result.Pass();
38 }
39
40 } // namespace compositor
OLDNEW
« no previous file with comments | « services/gfx/compositor/render/render_frame.h ('k') | services/gfx/compositor/render/render_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698