OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_GFX_CANVAS_DIRECT2D_H_ | 5 #ifndef UI_GFX_CANVAS_DIRECT2D_H_ |
6 #define UI_GFX_CANVAS_DIRECT2D_H_ | 6 #define UI_GFX_CANVAS_DIRECT2D_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <d2d1.h> | 9 #include <d2d1.h> |
10 | 10 |
11 #include <stack> | 11 #include <stack> |
12 | 12 |
13 #include "base/win/scoped_comptr.h" | 13 #include "base/win/scoped_comptr.h" |
14 #include "ui/gfx/canvas.h" | 14 #include "ui/gfx/canvas.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 | 17 |
18 class CanvasDirect2D : public Canvas { | 18 class UI_API CanvasDirect2D : public Canvas { |
19 public: | 19 public: |
20 // Creates an empty Canvas. | 20 // Creates an empty Canvas. |
21 explicit CanvasDirect2D(ID2D1RenderTarget* rt); | 21 explicit CanvasDirect2D(ID2D1RenderTarget* rt); |
22 virtual ~CanvasDirect2D(); | 22 virtual ~CanvasDirect2D(); |
23 | 23 |
24 // Retrieves the application's D2D1 Factory. | 24 // Retrieves the application's D2D1 Factory. |
25 static ID2D1Factory* GetD2D1Factory(); | 25 static ID2D1Factory* GetD2D1Factory(); |
26 | 26 |
27 // Overridden from Canvas: | 27 // Overridden from Canvas: |
28 virtual void Save(); | 28 virtual void Save(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 int clip_count; | 105 int clip_count; |
106 }; | 106 }; |
107 std::stack<RenderState> state_; | 107 std::stack<RenderState> state_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(CanvasDirect2D); | 109 DISALLOW_COPY_AND_ASSIGN(CanvasDirect2D); |
110 }; | 110 }; |
111 | 111 |
112 } // namespace gfx; | 112 } // namespace gfx; |
113 | 113 |
114 #endif // UI_GFX_CANVAS_DIRECT2D_H_ | 114 #endif // UI_GFX_CANVAS_DIRECT2D_H_ |
OLD | NEW |