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

Unified Diff: sky/compositor/rasterizer_bitmap.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/rasterizer_bitmap.h ('k') | sky/compositor/rasterizer_ganesh.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/compositor/rasterizer_bitmap.cc
diff --git a/sky/compositor/rasterizer_bitmap.cc b/sky/compositor/rasterizer_bitmap.cc
deleted file mode 100644
index ee926f212de68ce57798d5775d8e70c7a126fc2f..0000000000000000000000000000000000000000
--- a/sky/compositor/rasterizer_bitmap.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 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/rasterizer_bitmap.h"
-
-#include "sky/compositor/layer_client.h"
-#include "sky/compositor/layer_host.h"
-#include "third_party/skia/include/core/SkBitmapDevice.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkPicture.h"
-#include "ui/gfx/codec/png_codec.h"
-#include "ui/gfx/geometry/rect.h"
-
-namespace sky {
-
-RasterizerBitmap::RasterizerBitmap(LayerHost* host) : host_(host) {
- DCHECK(host_);
-}
-
-RasterizerBitmap::~RasterizerBitmap() {
-}
-
-void RasterizerBitmap::GetPixelsForTesting(std::vector<unsigned char>* pixels) {
- gfx::PNGCodec::EncodeBGRASkBitmap(bitmap_, true, pixels);
-}
-
-scoped_ptr<mojo::GLTexture> RasterizerBitmap::Rasterize(SkPicture* picture) {
- auto size = picture->cullRect();
- bitmap_.allocN32Pixels(size.width(), size.height());
-
- SkBitmapDevice device(bitmap_);
- SkCanvas canvas(&device);
- // Draw red so we can see when we fail to paint.
- canvas.drawColor(SK_ColorRED);
- canvas.drawPicture(picture);
- canvas.flush();
-
- return host_->resource_manager()->CreateTexture(
- gfx::Size(size.width(), size.height()));
-}
-
-} // namespace sky
« no previous file with comments | « sky/compositor/rasterizer_bitmap.h ('k') | sky/compositor/rasterizer_ganesh.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698