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

Unified Diff: cc/layers/picture_image_layer_unittest.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « cc/layers/picture_image_layer_impl_unittest.cc ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_image_layer_unittest.cc
diff --git a/cc/layers/picture_image_layer_unittest.cc b/cc/layers/picture_image_layer_unittest.cc
deleted file mode 100644
index 5b9375d2647210c6f388b11e30ee3b44fdfedb7e..0000000000000000000000000000000000000000
--- a/cc/layers/picture_image_layer_unittest.cc
+++ /dev/null
@@ -1,46 +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 "cc/layers/picture_image_layer.h"
-
-#include "cc/resources/display_item.h"
-#include "cc/test/skia_common.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkColor.h"
-
-namespace cc {
-namespace {
-
-TEST(PictureImageLayerTest, PaintContentsToDisplayList) {
- scoped_refptr<PictureImageLayer> layer = PictureImageLayer::Create();
- gfx::Rect layer_rect(200, 200);
-
- SkBitmap image_bitmap;
- unsigned char image_pixels[4 * 200 * 200] = {0};
- SkImageInfo info =
- SkImageInfo::MakeN32Premul(layer_rect.width(), layer_rect.height());
- image_bitmap.installPixels(info, image_pixels, info.minRowBytes());
- SkCanvas image_canvas(image_bitmap);
- image_canvas.clear(SK_ColorRED);
- SkPaint blue_paint;
- blue_paint.setColor(SK_ColorBLUE);
- image_canvas.drawRectCoords(0.f, 0.f, 100.f, 100.f, blue_paint);
- image_canvas.drawRectCoords(100.f, 100.f, 200.f, 200.f, blue_paint);
-
- layer->SetBitmap(image_bitmap);
- layer->SetBounds(gfx::Size(layer_rect.width(), layer_rect.height()));
-
- scoped_refptr<DisplayItemList> display_list =
- layer->PaintContentsToDisplayList(
- layer_rect, ContentLayerClient::PAINTING_BEHAVIOR_NORMAL);
- unsigned char actual_pixels[4 * 200 * 200] = {0};
- DrawDisplayList(actual_pixels, layer_rect, display_list);
-
- EXPECT_EQ(0, memcmp(actual_pixels, image_pixels, 4 * 200 * 200));
-}
-
-} // namespace
-} // namespace cc
« no previous file with comments | « cc/layers/picture_image_layer_impl_unittest.cc ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698