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

Side by Side Diff: third_party/WebKit/public/platform/WebScrollbarThemePainter.h

Issue 2768143002: Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: Fix win build Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 BLINK_PLATFORM_EXPORT bool thumbNeedsRepaint() const; 73 BLINK_PLATFORM_EXPORT bool thumbNeedsRepaint() const;
74 74
75 BLINK_PLATFORM_EXPORT bool usesNinePatchThumbResource() const; 75 BLINK_PLATFORM_EXPORT bool usesNinePatchThumbResource() const;
76 76
77 #if INSIDE_BLINK 77 #if INSIDE_BLINK
78 BLINK_PLATFORM_EXPORT WebScrollbarThemePainter(ScrollbarTheme&, 78 BLINK_PLATFORM_EXPORT WebScrollbarThemePainter(ScrollbarTheme&,
79 Scrollbar&, 79 Scrollbar&,
80 float deviceScaleFactor); 80 float deviceScaleFactor);
81 #endif 81 #endif
82 82
83 BLINK_PLATFORM_EXPORT float deviceScaleFactor() const {
84 return m_deviceScaleFactor;
85 }
86
83 private: 87 private:
84 // The theme is not owned by this class. It is assumed that the theme is a 88 // The theme is not owned by this class. It is assumed that the theme is a
85 // static pointer and its lifetime is essentially infinite. The functions 89 // static pointer and its lifetime is essentially infinite. The functions
86 // called from the painter may not be thread-safe, so all calls must be made 90 // called from the painter may not be thread-safe, so all calls must be made
87 // from the same thread that it is created on. 91 // from the same thread that it is created on.
88 ScrollbarTheme* m_theme; 92 ScrollbarTheme* m_theme;
89 93
90 // It is assumed that the constructor of this paint object is responsible 94 // It is assumed that the constructor of this paint object is responsible
91 // for the lifetime of this scrollbar. The painter has to use the real 95 // for the lifetime of this scrollbar. The painter has to use the real
92 // scrollbar (and not a WebScrollbar wrapper) due to static_casts for 96 // scrollbar (and not a WebScrollbar wrapper) due to static_casts for
93 // LayoutScrollbar and pointer-based HashMap lookups for Lion scrollbars. 97 // LayoutScrollbar and pointer-based HashMap lookups for Lion scrollbars.
94 WebPrivatePtr<Scrollbar> m_scrollbar; 98 WebPrivatePtr<Scrollbar> m_scrollbar;
95 99
96 float m_deviceScaleFactor; 100 float m_deviceScaleFactor;
97 }; 101 };
98 102
99 } // namespace blink 103 } // namespace blink
100 104
101 #endif 105 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698