Changeset 137447 in webkit
- Timestamp:
- Dec 12, 2012 3:34:46 AM (5 years ago)
- Location:
- trunk/Source/WebKit/gtk
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
WebCoreSupport/AcceleratedCompositingContext.h (modified) (1 diff)
-
WebCoreSupport/AcceleratedCompositingContextClutter.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/gtk/ChangeLog
r137329 r137447 1 2012-12-12 Joone Hur <joone.hur@intel.com> 2 3 [GTK][AC] GraphicsLayers are not shown on the viewport 4 https://bugs.webkit.org/show_bug.cgi?id=104670 5 6 Reviewed by Gustavo Noronha Silva. 7 8 GraphicsLayers are not shown on the viewport because the container(GtkClutterEmbed) 9 is not resized and shown, so this patch allows it to fit to the viewport. 10 11 * WebCoreSupport/AcceleratedCompositingContext.h: 12 * WebCoreSupport/AcceleratedCompositingContextClutter.cpp: 13 (WebKit::AcceleratedCompositingContext::renderLayersToWindow): 14 (WebKit::AcceleratedCompositingContext::setRootCompositingLayer): 15 (WebKit::AcceleratedCompositingContext::resizeRootLayer): 16 (WebKit::AcceleratedCompositingContext::layerFlushTimerFiredCallback): 17 (WebKit::AcceleratedCompositingContext::scheduleLayerFlush): 18 1 19 2012-12-11 Carlos Garcia Campos <cgarcia@igalia.com> 2 20 -
trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
r133517 r137447 78 78 WebCore::GraphicsLayer* m_rootGraphicsLayer; 79 79 GtkWidget* m_rootLayerEmbedder; 80 static gboolean layerFlushTimerFiredCallback(AcceleratedCompositingContext*); 80 81 #elif USE(TEXTURE_MAPPER_GL) 81 82 OwnPtr<WebCore::RedirectedXCompositeWindow> m_redirectedWindow; -
trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
r133517 r137447 57 57 { 58 58 notImplemented(); 59 return false;59 return true; 60 60 } 61 61 … … 69 69 } 70 70 71 // Create an instance of GtkClutterEmbed to host actors as web layers.71 // Create an instance of GtkClutterEmbed to embed actors as GraphicsLayers. 72 72 if (!m_rootLayerEmbedder) { 73 73 m_rootLayerEmbedder = gtk_clutter_embed_new(); 74 74 gtk_container_add(GTK_CONTAINER(m_webView), m_rootLayerEmbedder); 75 76 GtkAllocation allocation; 77 gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation); 78 gtk_widget_size_allocate(GTK_WIDGET(m_rootLayerEmbedder), &allocation); 75 79 gtk_widget_show(m_rootLayerEmbedder); 76 80 } 77 81 78 // Add a root layer to the stage.82 // Add a root GraphicsLayer to the stage. 79 83 if (graphicsLayer) { 80 84 m_rootGraphicsLayer = graphicsLayer; … … 85 89 clutter_actor_show_all(stage); 86 90 } 91 92 scheduleLayerFlush(); 87 93 } 88 94 … … 111 117 allocation.height = size.height(); 112 118 gtk_widget_size_allocate(GTK_WIDGET(m_rootLayerEmbedder), &allocation); 119 120 scheduleLayerFlush(); 113 121 } 114 122 … … 118 126 } 119 127 120 static gboolean flushAndRenderLayersCallback(AcceleratedCompositingContext* context)128 gboolean AcceleratedCompositingContext::layerFlushTimerFiredCallback(AcceleratedCompositingContext* context) 121 129 { 122 130 context->flushAndRenderLayers(); … … 131 139 // We use a GLib timer because otherwise GTK+ event handling during 132 140 // dragging can starve WebCore timers, which have a lower priority. 133 m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>( flushAndRenderLayersCallback), this, 0);141 m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0); 134 142 } 135 143
Note: See TracChangeset
for help on using the changeset viewer.