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

Side by Side Diff: ui/gfx/compositor/test/test_texture.h

Issue 9297041: Merge Compositor and CompositorCC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/compositor/test/test_suite.cc ('k') | ui/gfx/compositor/test/test_texture.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 #ifndef UI_GFX_COMPOSITOR_TEST_TEST_TEXTURE_H_
6 #define UI_GFX_COMPOSITOR_TEST_TEST_TEXTURE_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "ui/gfx/compositor/compositor.h"
12 #include "ui/gfx/rect.h"
13
14 namespace ui {
15
16 // Texture implementation that TextCompositor creates. Doesn't actually draw
17 // anything.
18 class TestTexture : public ui::Texture {
19 public:
20 TestTexture();
21 virtual ~TestTexture();
22
23 // Number of textures that have been created.
24 static void reset_live_count() { live_count_ = 0; }
25 static int live_count() { return live_count_; }
26
27 // Bounds of the last bitmap passed to SetCanvas.
28 const gfx::Rect& bounds_of_last_paint() const {
29 return bounds_of_last_paint_;
30 }
31
32 // ui::Texture
33 virtual void SetCanvas(const SkCanvas& canvas,
34 const gfx::Point& origin,
35 const gfx::Size& overall_size) OVERRIDE;
36 virtual void Draw(const ui::TextureDrawParams& params,
37 const gfx::Rect& clip_bounds) OVERRIDE;
38
39 private:
40 // Number of live instances.
41 static int live_count_;
42
43 gfx::Rect bounds_of_last_paint_;
44
45 DISALLOW_COPY_AND_ASSIGN(TestTexture);
46 };
47
48 } // namespace ui
49
50 #endif // UI_GFX_COMPOSITOR_TEST_TEST_TEXTURE_H_
OLDNEW
« no previous file with comments | « ui/gfx/compositor/test/test_suite.cc ('k') | ui/gfx/compositor/test/test_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698