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

Side by Side Diff: skia/ext/platform_device_win.h

Issue 21201: Transparency (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 SKIA_EXT_PLATFORM_DEVICE_WIN_H_ 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_WIN_H_
6 #define SKIA_EXT_PLATFORM_DEVICE_WIN_H_ 6 #define SKIA_EXT_PLATFORM_DEVICE_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 18 matching lines...) Expand all
29 // only during one pass of rendering. 29 // only during one pass of rendering.
30 virtual HDC getBitmapDC() = 0; 30 virtual HDC getBitmapDC() = 0;
31 31
32 // Draws to the given screen DC, if the bitmap DC doesn't exist, this will 32 // Draws to the given screen DC, if the bitmap DC doesn't exist, this will
33 // temporarily create it. However, if you have created the bitmap DC, it will 33 // temporarily create it. However, if you have created the bitmap DC, it will
34 // be more efficient if you don't free it until after this call so it doesn't 34 // be more efficient if you don't free it until after this call so it doesn't
35 // have to be created twice. If src_rect is null, then the entirety of the 35 // have to be created twice. If src_rect is null, then the entirety of the
36 // source device will be copied. 36 // source device will be copied.
37 virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect) = 0; 37 virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect) = 0;
38 38
39 // Invoke before using GDI functions. See description in platform_device.cc
40 // for specifics.
41 // NOTE: x,y,width and height are relative to the current transform.
42 virtual void prepareForGDI(int x, int y, int width, int height) { }
43
44 // Invoke after using GDI functions. See description in platform_device.cc
45 // for specifics.
46 // NOTE: x,y,width and height are relative to the current transform.
47 virtual void postProcessGDI(int x, int y, int width, int height) { }
48
49 // Sets the opacity of each pixel in the specified region to be opaque. 39 // Sets the opacity of each pixel in the specified region to be opaque.
50 virtual void makeOpaque(int x, int y, int width, int height) { } 40 virtual void makeOpaque(int x, int y, int width, int height) { }
51 41
52 // Call this function to fix the alpha channels before compositing this layer
53 // onto another. Internally, the device uses a special alpha method to work
54 // around problems with Windows. This call will put the values into what
55 // Skia expects, so it can be composited onto other layers.
56 //
57 // After this call, no more drawing can be done because the
58 // alpha channels will be "correct", which, if this function is called again
59 // will make them wrong. See the implementation for more discussion.
60 virtual void fixupAlphaBeforeCompositing() { }
61
62 // Returns if the preferred rendering engine is vectorial or bitmap based. 42 // Returns if the preferred rendering engine is vectorial or bitmap based.
63 virtual bool IsVectorial() = 0; 43 virtual bool IsVectorial() = 0;
64 44
65 // Initializes the default settings and colors in a device context. 45 // Initializes the default settings and colors in a device context.
66 static void InitializeDC(HDC context); 46 static void InitializeDC(HDC context);
67 47
68 // Loads a SkPath into the GDI context. The path can there after be used for 48 // Loads a SkPath into the GDI context. The path can there after be used for
69 // clipping or as a stroke. 49 // clipping or as a stroke.
70 static void LoadPathToDC(HDC context, const SkPath& path); 50 static void LoadPathToDC(HDC context, const SkPath& path);
71 51
(...skipping 17 matching lines...) Expand all
89 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); 69 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix);
90 70
91 // Transforms SkPath's paths into a series of cubic path. 71 // Transforms SkPath's paths into a series of cubic path.
92 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); 72 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath);
93 }; 73 };
94 74
95 } // namespace skia 75 } // namespace skia
96 76
97 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_ 77 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_
98 78
OLDNEW
« no previous file with comments | « skia/ext/platform_device_mac.cc ('k') | third_party/WebKit/WebCore/platform/graphics/chromium/FontChromiumWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698