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

Issue 8395012: Implemented AcceleratedSurface for Windows. (Closed)

Created:
9 years, 2 months ago by apatrick_chromium
Modified:
9 years, 1 month ago
CC:
chromium-reviews
Visibility:
Public.

Description

Implemented AcceleratedSurface for Windows. It allows a D3D9Ex render target texture to be drawn in one process and presented to a Window in another. Presentation is done by a pool of 4 threads so that multiple (up to 4) windows can be presented at full frame rate. It also deals with acknowleding when it is safe for the producer to render the next frame. There are some complications with D3D and threading. Even when a device is created with the MULTITHREAD flag, there are limitations to what can be done. Only the thread that creates the device can reset it or destroy it. Therefore each Accelerated surface keeps track of which thread that is. Any thread can present so a simple round robin scheduler assigns presents to the least recently used thread. It'll be used by this: http://codereview.chromium.org/8060045/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108169

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+586 lines, -0 lines) Patch
A ui/gfx/surface/accelerated_surface_win.h View 1 2 3 1 chunk +78 lines, -0 lines 0 comments Download
A ui/gfx/surface/accelerated_surface_win.cc View 1 2 3 1 chunk +505 lines, -0 lines 0 comments Download
M ui/gfx/surface/surface.gyp View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
apatrick_chromium
9 years, 2 months ago (2011-10-25 18:45:42 UTC) #1
nduca
I can haz TRACE_EVENTs peppered through time-consuming parts of this patch?
9 years, 2 months ago (2011-10-25 19:11:06 UTC) #2
apatrick
That would be awesome but ui/surface can't depend on gpu/. I suppose I could move ...
9 years, 2 months ago (2011-10-25 20:03:54 UTC) #3
nduca
trace_event.h is a base/debug thing... does that help?
9 years, 2 months ago (2011-10-25 20:15:14 UTC) #4
apatrick_chromium
On 2011/10/25 20:15:14, nduca wrote: > trace_event.h is a base/debug thing... does that help? Done
9 years, 1 month ago (2011-10-26 23:20:57 UTC) #5
apatrick_chromium
+jbauman. Can you take a look at this? nduca is rather busy.
9 years, 1 month ago (2011-10-27 01:03:27 UTC) #6
jbauman
http://codereview.chromium.org/8395012/diff/3005/ui/gfx/surface/accelerated_surface_win.cc File ui/gfx/surface/accelerated_surface_win.cc (right): http://codereview.chromium.org/8395012/diff/3005/ui/gfx/surface/accelerated_surface_win.cc#newcode186 ui/gfx/surface/accelerated_surface_win.cc:186: parameters.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; Is this necessary? Also, what presentation ...
9 years, 1 month ago (2011-10-27 01:26:34 UTC) #7
apatrick_chromium
http://codereview.chromium.org/8395012/diff/3005/ui/gfx/surface/accelerated_surface_win.cc File ui/gfx/surface/accelerated_surface_win.cc (right): http://codereview.chromium.org/8395012/diff/3005/ui/gfx/surface/accelerated_surface_win.cc#newcode186 ui/gfx/surface/accelerated_surface_win.cc:186: parameters.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; On 2011/10/27 01:26:35, jbauman wrote: > ...
9 years, 1 month ago (2011-10-27 17:44:32 UTC) #8
apatrick_chromium
All done. PTAL.
9 years, 1 month ago (2011-10-28 21:54:21 UTC) #9
jbauman
lgtm
9 years, 1 month ago (2011-10-31 22:50:31 UTC) #10
apatrick_chromium
Thinking about this some more, in the event that a present is requested before a ...
9 years, 1 month ago (2011-11-01 18:02:33 UTC) #11
Ben Goodger (Google)
I don't see an OWNERS file in ui/gfx/surface or ui/gfx. Given that, and the OWNERS ...
9 years, 1 month ago (2011-11-01 22:38:32 UTC) #12
apatrick_chromium
On 2011/11/01 22:38:32, Ben Goodger (Google) wrote: > I don't see an OWNERS file in ...
9 years, 1 month ago (2011-11-01 22:52:12 UTC) #13
Ben Goodger (Google)
No problem. Looks like we didn't have set noparent set. I just fixed it. I ...
9 years, 1 month ago (2011-11-01 22:53:30 UTC) #14
apatrick_chromium
That'll work, it's not being used by anything yet. Is it just build problems or ...
9 years, 1 month ago (2011-11-01 23:13:30 UTC) #15
Ben Goodger (Google)
9 years, 1 month ago (2011-11-01 23:59:25 UTC) #16
You're using gfx::NativeWindow, which in USE_AURA is defined to be
aura::Window*, not HWND. USE_AURA can be defined on Windows and Linux.

Aura is a synthetic windowing environment that is contained within a single
toplevel window. There is a single compositor at the root that draws the UI
and web content.

-Ben

On Tue, Nov 1, 2011 at 4:13 PM, <apatrick@chromium.org> wrote:

> That'll work, it's not being used by anything yet. Is it just build
> problems or
> is there something more fundamentally wrong with it?
>
>
http://codereview.chromium.**org/8395012/<http://codereview.chromium.org/8395...
>

Powered by Google App Engine
This is Rietveld 408576698