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

Side by Side Diff: gfx/canvas_direct2d.h

Issue 3058012: Add support for Radial Gradient Brush and Bitmap Brush to gfx::Canvas.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « gfx/canvas.h ('k') | gfx/canvas_direct2d.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 GFX_CANVAS_DIRECT2D_H_ 5 #ifndef GFX_CANVAS_DIRECT2D_H_
6 #define GFX_CANVAS_DIRECT2D_H_ 6 #define GFX_CANVAS_DIRECT2D_H_
7 #pragma once 7 #pragma once
8 8
9 #include <d2d1.h> 9 #include <d2d1.h>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 int dest_x, int dest_y, int w, int h); 68 int dest_x, int dest_y, int w, int h);
69 virtual gfx::NativeDrawingContext BeginPlatformPaint(); 69 virtual gfx::NativeDrawingContext BeginPlatformPaint();
70 virtual void EndPlatformPaint(); 70 virtual void EndPlatformPaint();
71 virtual Brush* CreateLinearGradientBrush( 71 virtual Brush* CreateLinearGradientBrush(
72 const gfx::Point& start_point, 72 const gfx::Point& start_point,
73 const gfx::Point& end_point, 73 const gfx::Point& end_point,
74 const SkColor colors[], 74 const SkColor colors[],
75 const float positions[], 75 const float positions[],
76 size_t position_count, 76 size_t position_count,
77 TileMode tile_mode); 77 TileMode tile_mode);
78 virtual Brush* CreateRadialGradientBrush(
79 const gfx::Point& center_point,
80 float radius,
81 const SkColor colors[],
82 const float positions[],
83 size_t position_count,
84 TileMode tile_mode);
85 virtual Brush* CreateBitmapBrush(
86 const SkBitmap& bitmap,
87 TileMode tile_mode_x,
88 TileMode tile_mode_y);
78 virtual CanvasSkia* AsCanvasSkia(); 89 virtual CanvasSkia* AsCanvasSkia();
79 virtual const CanvasSkia* AsCanvasSkia() const; 90 virtual const CanvasSkia* AsCanvasSkia() const;
80 91
81 private: 92 private:
82 void SaveInternal(ID2D1Layer* layer); 93 void SaveInternal(ID2D1Layer* layer);
83 94
84 ID2D1RenderTarget* rt_; 95 ID2D1RenderTarget* rt_;
85 ScopedComPtr<ID2D1GdiInteropRenderTarget> interop_rt_; 96 ScopedComPtr<ID2D1GdiInteropRenderTarget> interop_rt_;
86 ScopedComPtr<ID2D1DrawingStateBlock> drawing_state_block_; 97 ScopedComPtr<ID2D1DrawingStateBlock> drawing_state_block_;
87 static ID2D1Factory* d2d1_factory_; 98 static ID2D1Factory* d2d1_factory_;
(...skipping 13 matching lines...) Expand all
101 int clip_count; 112 int clip_count;
102 }; 113 };
103 std::stack<RenderState> state_; 114 std::stack<RenderState> state_;
104 115
105 DISALLOW_COPY_AND_ASSIGN(CanvasDirect2D); 116 DISALLOW_COPY_AND_ASSIGN(CanvasDirect2D);
106 }; 117 };
107 118
108 } // namespace gfx; 119 } // namespace gfx;
109 120
110 #endif // GFX_CANVAS_DIRECT2D_H_ 121 #endif // GFX_CANVAS_DIRECT2D_H_
OLDNEW
« no previous file with comments | « gfx/canvas.h ('k') | gfx/canvas_direct2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698