Title: [135673] trunk/Source/WebCore
- Revision
- 135673
- Author
- [email protected]
- Date
- 2012-11-25 11:19:08 -0800 (Sun, 25 Nov 2012)
Log Message
[EFL] Refactor RenderThemeEfl::ThemePartCacheEntry::reuse()
https://bugs.webkit.org/show_bug.cgi?id=103189
Patch by Christophe Dumez <[email protected]> on 2012-11-25
Reviewed by Kenneth Rohde Christiansen.
Check if the entry size and type changed in
RenderThemeEfl::ThemePartCacheEntry::reuse() to avoid
useless processing if one of them did not change.
Remove useless call to cairo_surface_finish() since
we are using a smart pointer for the surface.
Resize the edge object *after* loading its content
from the theme file as it seems more logical this
way.
No new tests, no behavior change for layout tests.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
* platform/efl/RenderThemeEfl.h:
(ThemePartCacheEntry):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (135672 => 135673)
--- trunk/Source/WebCore/ChangeLog 2012-11-25 19:06:22 UTC (rev 135672)
+++ trunk/Source/WebCore/ChangeLog 2012-11-25 19:19:08 UTC (rev 135673)
@@ -1,3 +1,28 @@
+2012-11-25 Christophe Dumez <[email protected]>
+
+ [EFL] Refactor RenderThemeEfl::ThemePartCacheEntry::reuse()
+ https://bugs.webkit.org/show_bug.cgi?id=103189
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Check if the entry size and type changed in
+ RenderThemeEfl::ThemePartCacheEntry::reuse() to avoid
+ useless processing if one of them did not change.
+
+ Remove useless call to cairo_surface_finish() since
+ we are using a smart pointer for the surface.
+
+ Resize the edge object *after* loading its content
+ from the theme file as it seems more logical this
+ way.
+
+ No new tests, no behavior change for layout tests.
+
+ * platform/efl/RenderThemeEfl.cpp:
+ (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
+ * platform/efl/RenderThemeEfl.h:
+ (ThemePartCacheEntry):
+
2012-11-25 Ryosuke Niwa <[email protected]>
Rename DynamicNodeList to LiveNodeList
Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (135672 => 135673)
--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2012-11-25 19:06:22 UTC (rev 135672)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2012-11-25 19:19:08 UTC (rev 135673)
@@ -216,9 +216,15 @@
{
ASSERT(!themePath.isEmpty());
- if (!newSize.isEmpty()) {
- cairo_surface_finish(surface());
+ if (type != newType) {
+ type = newType;
+ if (!setSourceGroupForEdjeObject(edje(), themePath, toEdjeGroup(newType))) {
+ type = FormTypeLast; // Invalidate.
+ return;
+ }
+ }
+ if (size != newSize) {
size = newSize;
ecore_evas_resize(canvas(), newSize.width(), newSize.height());
evas_object_resize(edje(), newSize.width(), newSize.height());
@@ -229,13 +235,6 @@
return;
}
}
-
- if (!setSourceGroupForEdjeObject(edje(), themePath, toEdjeGroup(newType))) {
- type = FormTypeLast; // Invalidate.
- return;
- }
-
- type = newType;
}
RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::getThemePartFromCache(FormType type, const IntSize& size)
Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.h (135672 => 135673)
--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.h 2012-11-25 19:06:22 UTC (rev 135672)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.h 2012-11-25 19:19:08 UTC (rev 135673)
@@ -266,7 +266,7 @@
struct ThemePartCacheEntry {
static PassOwnPtr<RenderThemeEfl::ThemePartCacheEntry> create(const String& themePath, FormType, const IntSize&);
- void reuse(const String& themePath, FormType, const IntSize& = IntSize());
+ void reuse(const String& themePath, FormType, const IntSize&);
ALWAYS_INLINE Ecore_Evas* canvas() { return m_canvas.get(); }
ALWAYS_INLINE Evas_Object* edje() { return m_edje.get(); }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes