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

Side by Side Diff: ui/compositor/layer_unittest.cc

Issue 10365007: ui: Move compositor/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DEPS Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/layer_type.h ('k') | ui/compositor/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/compositor/compositor_observer.h"
14 #include "ui/compositor/layer.h"
15 #include "ui/compositor/layer_animation_sequence.h"
16 #include "ui/compositor/test/test_compositor_host.h"
13 #include "ui/gfx/canvas.h" 17 #include "ui/gfx/canvas.h"
14 #include "ui/gfx/codec/png_codec.h" 18 #include "ui/gfx/codec/png_codec.h"
15 #include "ui/gfx/compositor/compositor_observer.h"
16 #include "ui/gfx/compositor/layer.h"
17 #include "ui/gfx/compositor/layer_animation_sequence.h"
18 #include "ui/gfx/compositor/test/test_compositor_host.h"
19 #include "ui/gfx/gfx_paths.h" 19 #include "ui/gfx/gfx_paths.h"
20 #include "ui/gfx/skia_util.h" 20 #include "ui/gfx/skia_util.h"
21 21
22 #include "ui/gfx/compositor/compositor_setup.h" 22 #include "ui/compositor/compositor_setup.h"
23 23
24 namespace ui { 24 namespace ui {
25 25
26 namespace { 26 namespace {
27 27
28 // Encodes a bitmap into a PNG and write to disk. Returns true on success. The 28 // Encodes a bitmap into a PNG and write to disk. Returns true on success. The
29 // parent directory does not have to exist. 29 // parent directory does not have to exist.
30 bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path) { 30 bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path) {
31 std::vector<unsigned char> png_data; 31 std::vector<unsigned char> png_data;
32 if (gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data) && 32 if (gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data) &&
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 EXPECT_TRUE(schedule_draw_invoked_); 1015 EXPECT_TRUE(schedule_draw_invoked_);
1016 // Because SchedulePaint() was invoked from OnPaintLayer() |child| should 1016 // Because SchedulePaint() was invoked from OnPaintLayer() |child| should
1017 // still need to be painted. 1017 // still need to be painted.
1018 DrawTree(root.get()); 1018 DrawTree(root.get());
1019 EXPECT_EQ(1, child_delegate.GetPaintCountAndClear()); 1019 EXPECT_EQ(1, child_delegate.GetPaintCountAndClear());
1020 EXPECT_TRUE(child_delegate.last_clip_rect().Contains( 1020 EXPECT_TRUE(child_delegate.last_clip_rect().Contains(
1021 gfx::Rect(10, 10, 30, 30))); 1021 gfx::Rect(10, 10, 30, 30)));
1022 } 1022 }
1023 1023
1024 } // namespace ui 1024 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer_type.h ('k') | ui/compositor/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698