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

Unified Diff: sky/compositor/layer.cc

Issue 1213683004: Move //sky/compositor to //sky/viewer/compositor (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/compositor/layer.h ('k') | sky/compositor/layer_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/compositor/layer.cc
diff --git a/sky/compositor/layer.cc b/sky/compositor/layer.cc
deleted file mode 100644
index 5c05fdf5c64d7f03982f9b1c75a835c43e612ba0..0000000000000000000000000000000000000000
--- a/sky/compositor/layer.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2014 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 "sky/compositor/layer.h"
-
-#include "base/trace_event/trace_event.h"
-#include "sky/compositor/layer_host.h"
-#include "sky/compositor/picture_serializer.h"
-#include "sky/compositor/rasterizer.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkPictureRecorder.h"
-
-namespace sky {
-
-Layer::Layer(LayerClient* client) : client_(client) {
-}
-
-Layer::~Layer() {
-}
-
-void Layer::SetSize(const gfx::Size& size) {
- size_ = size;
-}
-
-void Layer::Display() {
- TRACE_EVENT0("sky", "Layer::Display");
- DCHECK(rasterizer_);
- auto picture = RecordPicture();
-
-#if 0
- SerializePicture(
- "/data/data/org.chromium.mojo.shell/cache/layer0.skp", picture.get());
-#endif
-
- texture_ = rasterizer_->Rasterize(picture.get());
-}
-
-skia::RefPtr<SkPicture> Layer::RecordPicture() {
- TRACE_EVENT0("sky", "Layer::RecordPicture");
-
- SkRTreeFactory factory;
- SkPictureRecorder recorder;
-
- auto canvas = skia::SharePtr(recorder.beginRecording(
- size_.width(), size_.height(), &factory,
- SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag));
-
- client_->PaintContents(canvas.get(), gfx::Rect(size_));
- return skia::AdoptRef(recorder.endRecordingAsPicture());
-}
-
-scoped_ptr<mojo::GLTexture> Layer::GetTexture() {
- return texture_.Pass();
-}
-
-} // namespace sky
« no previous file with comments | « sky/compositor/layer.h ('k') | sky/compositor/layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698