Closed
Bug 1278236
Opened 9 years ago
Closed 9 years ago
Convert GetSurfaceForGdkDrawable to return a DrawTarget
Categories
(Core :: Widget: Gtk, defect)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Attachments
(2 files, 1 obsolete file)
5.91 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
991 bytes,
patch
|
Details | Diff | Splinter Review |
As part of getting rid of gfxXlibSurface (and ultimately gfxASurface) I have a patch that pushes the DrawTarget wrapping of the gfxXlibSurface created by GetSurfaceForGdkDrawable back to just after it is created (rather than passing it out to callers and having it wrapped later).
Once we get to a point where all gfxXlibSurface surfaces are immediately wrapped it becomes easy to replace them all with a DrawTarget that directly wraps a cairo_xlib_surface_t.
![]() |
Assignee | |
Comment 1•9 years ago
|
||
Attachment #8760256 -
Flags: review?(bas)
Comment 2•9 years ago
|
||
Comment on attachment 8760256 [details] [diff] [review]
patch
Review of attachment 8760256 [details] [diff] [review]:
-----------------------------------------------------------------
::: widget/gtk/nsWindow.cpp
@@ +6462,5 @@
> return keyBindings->Execute(aEvent, aCallback, aCallbackData);
> }
>
> #if defined(MOZ_X11) && (MOZ_WIDGET_GTK == 2)
> /* static */ already_AddRefed<gfxASurface>
I don't see how this compiles since the return value here is wrong.
Attachment #8760256 -
Flags: review?(bas) → review-
![]() |
Assignee | |
Comment 3•9 years ago
|
||
Good catch. I guess that must mean all our linux builders on Try are using gtk3 now.
![]() |
Assignee | |
Comment 4•9 years ago
|
||
Attachment #8760256 -
Attachment is obsolete: true
Attachment #8760347 -
Flags: review?(bas)
![]() |
Assignee | |
Comment 5•9 years ago
|
||
FWIW I need this patch to make progress on tier 1 work, but karlt considers this code tier 2 - we don't bother to build and test it ourselves, but we should try to write code that will work for it:
https://bugzilla.mozilla.org/show_bug.cgi?id=1278282#c1
Updated•9 years ago
|
Attachment #8760347 -
Flags: review?(bas) → review+
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f26550274a45
Convert GetSurfaceForGdkDrawable to return a DrawTarget. r=Bas
Comment 7•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment 8•9 years ago
|
||
/media/data/develop/mozilla/central/widget/gtk/nsDragService.cpp:446:48: error: no matching constructor for initialization of 'IntRect'
![]() |
Assignee | |
Comment 9•9 years ago
|
||
Comment 12•9 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #9)
> Created attachment 8762689 [details] [diff] [review]
> potential compilation fix
This patch does not fix the compilation issue for me. I additionally need this as well:
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -316,17 +316,17 @@ public:
nsresult UpdateTranslucentWindowAlphaInternal(const nsIntRect& aRect,
uint8_t* aAlphas, int32_t aStride);
already_AddRefed<mozilla::gfx::DrawTarget> GetDrawTarget(const LayoutDeviceIntRegion& aRegion,
mozilla::layers::BufferMode* aBufferMode);
#if (MOZ_WIDGET_GTK == 2)
static already_AddRefed<DrawTarget> GetDrawTargetForGdkDrawable(GdkDrawable* aDrawable,
- const IntSize& aSize);
+ const nsIntSize& aSize);
#endif
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent) override;
virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
uint32_t aNativeMessage,
uint32_t aModifierFlags,
nsIObserver* aObserver) override;
You need to log in
before you can comment on or make changes to this bug.
Description
•