summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/client/command_buffer_proxy_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* gpu: Remove unnecessary media referencesfsamuel2016-03-231-5/+0
| | | | | | | | BUG=586384 Review URL: https://codereview.chromium.org/1822003004 Cr-Commit-Position: refs/heads/master@{#382965}
* mustash: Towards decoupling media from client-side of gpu servicefsamuel2016-03-141-16/+0
| | | | | | | | | | | | | | This CL works towards decoupling media code from gpu code. Media code becomes a layer that lives above Gpu and either content or mus becomes the layer that glues the two together. In particular, GpuChannelHost and CommandBufferProxyImpl no longer refer to media code. BUG=586384 Review URL: https://codereview.chromium.org/1776993003 Cr-Commit-Position: refs/heads/master@{#381067}
* Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type.lukasza2016-02-161-2/+3
| | | | | | | | | | | | | | | This CL generalizes the pattern used by content::SavePackageId and cc::SurfaceId and puts it into //base/id_type.h. Using this pattern for gpu::CommandBufferId should hopefully help avoid bugs like the mixup fixed by https://crrev.com/365437. BUG=514815, 565545 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=wolenetz@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/1548443002 Cr-Commit-Position: refs/heads/master@{#375620}
* Removed last references to old sync points.dyen2016-01-221-5/+0
| | | | | | | | | BUG=514815, 373452 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1615253006 Cr-Commit-Position: refs/heads/master@{#371082}
* Harden CommandBufferProxyImplpiman2016-01-141-0/+13
| | | | | | | | | | | This avoids a class of errors where a message/reply from the GPU process is received that indicates invalid state. BUG=563964 Review URL: https://codereview.chromium.org/1581273002 Cr-Commit-Position: refs/heads/master@{#369509}
* Added method to synchronize command buffers within GpuControl.dyen2016-01-051-0/+1
| | | | | | | | BUG=514815 Review URL: https://codereview.chromium.org/1559893003 Cr-Commit-Position: refs/heads/master@{#367457}
* Switch to standard integer types in content/common/.avi2015-12-251-34/+38
| | | | | | | | | BUG=138542 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1545163002 Cr-Commit-Position: refs/heads/master@{#366850}
* Reland "Added an extra sync token field for extra command buffer..."dyen2015-12-091-0/+1
| | | | | | | | | | | This reverts commit 5097a2103f86741a7d0e6567e57759be939182b0. R=dalecurtis@chromium.org, dcheng@chromium.org, piman@chromium.org, sky@chromium.org BUG=514815, 566291 Review URL: https://codereview.chromium.org/1499813003 Cr-Commit-Position: refs/heads/master@{#363922}
* Revert of Added an extra sync token field for extra command buffer ↵ajuma2015-12-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | identification. (patchset #8 id:140001 of https://codereview.chromium.org/1489573003/ ) Reason for revert: This is causing a large number of layout tests in virtual/threaded/animations to crash. They're hitting the following assertion: FATAL:scheduler.cc(203)] Check failed: state_machine_.pending_swaps() > 0 (0 vs. 0){"compositor_timing_history": e.g. see https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.7%20%28dbg%29/builds/25835 Confirmed with a local bisect. Original issue's description: > Added an extra sync token field for extra command buffer identification. > > This CL adds an extra field within sync tokens without changing the size > of the sync token. Currently this extra field is only used for the > GPU channel implementation, storing the stream of the identified command > buffer. > > BUG=514815 > > Committed: https://crrev.com/f21e7e6e2b260d56fa54373dd662c81c9d955331 > Cr-Commit-Position: refs/heads/master@{#363231} TBR=dcheng@chromium.org,dalecurtis@chromium.org,piman@chromium.org,sky@chromium.org,dyen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=514815 Review URL: https://codereview.chromium.org/1495893005 Cr-Commit-Position: refs/heads/master@{#363290}
* Added an extra sync token field for extra command buffer identification.dyen2015-12-041-0/+1
| | | | | | | | | | | | | This CL adds an extra field within sync tokens without changing the size of the sync token. Currently this extra field is only used for the GPU channel implementation, storing the stream of the identified command buffer. BUG=514815 Review URL: https://codereview.chromium.org/1489573003 Cr-Commit-Position: refs/heads/master@{#363231}
* Cleanup SurfaceVisibility code.sohan.jyoti2015-11-301-1/+0
| | | | | | | | | BUG=None CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1469863003 Cr-Commit-Position: refs/heads/master@{#362203}
* Remove CreateStreamTexture from GL interfaces.siva.gunturi2015-11-151-1/+1
| | | | | | | | | | | | | | Remove CreateStreamTexture from gpu_control.h. Use CreateStreamTexture as a non virtual function in command_buffer_proxy and in_process_command_buffer (for STFSynchronous).Use CreateStreamTexture instead of gl->CreateStreamTextureCHROMIUM. BUG=516585, 339191 Review URL: https://codereview.chromium.org/1385883002 Cr-Commit-Position: refs/heads/master@{#359778}
* Re-land: Converted video frame and image callbacks to use new sync tokens.dyen2015-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a1ab22a90140fe9e6c669998f3efc52795e569e2. Original issue's description: > Converted video frame and image callbacks to use new sync tokens. > > As an incremental step towards utilizing the new sync tokens, this > CL converts existing video frame and image sync points to use > sync tokens instead. > > In order to accomplish this, the GpuCommandBufferMsg_CreateImage > IPC message has been modified to accept a fence_release parameter > so that it can act as a sync token IPC. > > A new SyncPointClientWaiter concept has also added which can wait > on other sync point clients without an associated order number. > This only works because the SyncPointClientWaiter cannot be waited > on so no deadlocks can occur. > > BUG=514815 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/c7aff68a0c11820cc2b8d488851c682c0d32cd2b > Cr-Commit-Position: refs/heads/master@{#357997} BUG=514815 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1427893003 Cr-Commit-Position: refs/heads/master@{#358346}
* Revert of Converted video frame and image callbacks to use new sync tokens. ↵nhiroki2015-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #9 id:160001 of https://codereview.chromium.org/1429213002/ ) Reason for revert: This could be breaking webkit_tests: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20%28dbg%29/builds/4445 http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.7%20%28dbg%29/builds/25461 Original issue's description: > Converted video frame and image callbacks to use new sync tokens. > > As an incremental step towards utilizing the new sync tokens, this > CL converts existing video frame and image sync points to use > sync tokens instead. > > In order to accomplish this, the GpuCommandBufferMsg_CreateImage > IPC message has been modified to accept a fence_release parameter > so that it can act as a sync token IPC. > > A new SyncPointClientWaiter concept has also added which can wait > on other sync point clients without an associated order number. > This only works because the SyncPointClientWaiter cannot be waited > on so no deadlocks can occur. > > BUG=514815 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/c7aff68a0c11820cc2b8d488851c682c0d32cd2b > Cr-Commit-Position: refs/heads/master@{#357997} TBR=dcheng@chromium.org,dalecurtis@chromium.org,piman@chromium.org,sky@chromium.org,dyen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=514815 Review URL: https://codereview.chromium.org/1414793018 Cr-Commit-Position: refs/heads/master@{#358008}
* Converted video frame and image callbacks to use new sync tokens.dyen2015-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | As an incremental step towards utilizing the new sync tokens, this CL converts existing video frame and image sync points to use sync tokens instead. In order to accomplish this, the GpuCommandBufferMsg_CreateImage IPC message has been modified to accept a fence_release parameter so that it can act as a sync token IPC. A new SyncPointClientWaiter concept has also added which can wait on other sync point clients without an associated order number. This only works because the SyncPointClientWaiter cannot be waited on so no deadlocks can occur. BUG=514815 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1429213002 Cr-Commit-Position: refs/heads/master@{#357997}
* Added support for sync token signals.dyen2015-10-221-1/+4
| | | | | | | | | | | | Much like the old sync point singals, this CL implements signals for the new light weight sync tokens. BUG=514815 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1413933006 Cr-Commit-Position: refs/heads/master@{#355629}
* Added method to wait on fence syncs which do not need to be flushed.dyen2015-10-141-0/+2
| | | | | | | | | | | | | | | | With streams from the same channel, we do not need to flush before we can wait on the fence sync. I've added a new method which generates a sync token for unflushed fences (glGenUnverifiedSyncTokenCHROMIUM). Sync tokens generated using this function will be validated when glWaitSyncTokenCHROMIUM is called to validate that it did not need to be flushed and validated. R=jam@chromium.org, piman@chromium.org, rjkroege@chromium.org BUG=514815 Review URL: https://codereview.chromium.org/1401463004 Cr-Commit-Position: refs/heads/master@{#354051}
* Implemented new fence syncs which replaces the old sync points.dyen2015-10-071-0/+18
| | | | | | | | | | | | | | | The new GL_CHROMIUM_sync_point proposal has been implemented now. The old functions are all different enough that no names were overloaded, so all of the old functionality still exists. This way, we can incrementally move over call sites of the old functions to use the new ones. R=jam@chromium.org, piman@chromium.org BUG=514815 Review URL: https://codereview.chromium.org/1331843005 Cr-Commit-Position: refs/heads/master@{#352901}
* Move gpu memory calculations to Compositor.sohan.jyoti2015-10-051-7/+0
| | | | | | | | | | | | This moves gpu memory policy code from gpumemorymanager to renderer compositor. It will be useful for renderer to use off screen context. BUG=526196 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1324413003 Cr-Commit-Position: refs/heads/master@{#352301}
* Added a unique command buffer ID for command buffers.dyen2015-09-181-0/+3
| | | | | | | | | R=piman@chromium.org BUG=514815 Review URL: https://codereview.chromium.org/1345813002 Cr-Commit-Position: refs/heads/master@{#349546}
* content/gpu: Lay the groundwork for GPU streams on the client side.sunnyps2015-08-101-4/+9
| | | | | | | | | | | | GPU streams are intended as a way of multiplexing multiple streams of execution on a single GPU channel. This CL lays the ground work on the client side. BUG=514809 Review URL: https://codereview.chromium.org/1258913004 Cr-Commit-Position: refs/heads/master@{#342675}
* content/gpu: Ownership and lifetime cleanup for CommandBufferProxyImpl.sunnyps2015-08-041-2/+3
| | | | | | | | | | | | | | Ownership and lifetime of CommandBufferProxyImpl was confusing because it predates the use of smart pointers in chromium. With this CL command buffer proxies are managed automatically, GpuChannelHost no longer keeps raw pointers to the command buffer proxies and GetRouteID was renamed to route_id for consistency. BUG=514809 Review URL: https://codereview.chromium.org/1259183006 Cr-Commit-Position: refs/heads/master@{#341678}
* content: Remove unused member in CommandBufferProxyImpl.reveman2015-06-161-5/+0
| | | | | | | | | | | This removes CommandBufferProxyImpl::gpu_memory_buffers_. BUG= TBR=piman@chromium.org Review URL: https://codereview.chromium.org/1189743002 Cr-Commit-Position: refs/heads/master@{#334535}
* DCHECK if shader compilation fails that it's due to context loss.danakj2015-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add GetGraphicsResetStatusKHR() to GLES2Interface so GLHelper code can verify this. Adds IsGpuChannelLost() to GpuControl to tell if the GpuChannelHost has lost its connection to the GPU process, which is implemented in CommandBufferProxyImpl. Uses this along with the GetLastState() on the CommandBuffer (via CommandBufferHelper::IsContextLost()) to tell if the context is lost from GLES2Implementation. R=piman@chromium.org TBR=sky BUG=492447 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1160863007 Cr-Commit-Position: refs/heads/master@{#333404}
* Replace more ObserverList with base::ObserverList.brettw2015-06-031-1/+1
| | | | | | | | | | | | This is everything but the chrome directory CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=zelidrag@chromium.org (chromeos) TBR=keybuk@chromium.org (device/bluetooth) Review URL: https://codereview.chromium.org/1162943002 Cr-Commit-Position: refs/heads/master@{#332626}
* Adding status to swap buffers completionachaulk2015-05-291-2/+5
| | | | | | | | | | | | | | This will give us more options than completing all swaps successfully, or losing context BUG=476966 TBR=torne - approved interface change Committed: https://crrev.com/c794eda78e9ba3c46b550b433e9fe5a248d40104 Cr-Commit-Position: refs/heads/master@{#331906} Review URL: https://codereview.chromium.org/1084173004 Cr-Commit-Position: refs/heads/master@{#331989}
* Revert of Adding status to swap complete (patchset #18 id:340001 of ↵vabr2015-05-291-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1084173004/) Reason for revert: Looks like this broke compilation on http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Builder/builds/17401. Speculatively reverting for now. If confirmed, will file a bug with details, otherwise re-revert. Cheers, your's sheriff Original issue's description: > Adding status to swap buffers completion > > This will give us more options than completing all swaps successfully, or losing context > > BUG=476966 > TBR=torne - approved interface change > > Committed: https://crrev.com/c794eda78e9ba3c46b550b433e9fe5a248d40104 > Cr-Commit-Position: refs/heads/master@{#331906} TBR=alexst@chromium.org,danakj@chromium.org,dnicoara@chromium.org,nasko@chromium.org,piman@chromium.org,spang@chromium.org,torne@chromium.org,dcheng@chromium.org,achaulk@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=476966 Review URL: https://codereview.chromium.org/1166463004 Cr-Commit-Position: refs/heads/master@{#331939}
* Adding status to swap buffers completionachaulk2015-05-291-2/+5
| | | | | | | | | | | This will give us more options than completing all swaps successfully, or losing context BUG=476966 TBR=torne - approved interface change Review URL: https://codereview.chromium.org/1084173004 Cr-Commit-Position: refs/heads/master@{#331906}
* Change ScopedPtrHashMap's 2nd template parameterkcwu2015-04-281-1/+1
| | | | | | | | | | | | | | | | Now ScopedPtrHashMap expect the 2nd parameter is scoped_ptr<T>. For example, old usage ScopedPtrHashMap<int, Value> new usage ScopedPtrHashMap<int, scoped_ptr<Value>> With this change, ScopedPtrHashMap support scoped_ptr's custom deleter. R=danakj@chromium.org, tzik@chromium.org BUG=none Review URL: https://codereview.chromium.org/1099383002 Cr-Commit-Position: refs/heads/master@{#327341}
* gpu: Fix some context lost marking glitches+leaks and add UMA statssievers2015-04-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This fixes some glitches in the decoder where we were not ending up with the correct 'context lost' reason, such as calling things in the wrong order or calling glGetGraphicsResetStatus() while we might not have the correct context current. * Add context lost reasons for when the context group is forcibly lost when GL_OUT_OF_MEMORY is detected and when MakeCurrent fails. * Also communicate parse errors to the client. * Record UMA histograms for each context type (for example 'browser compositor') with the context lost reason. * Always lose (client-side) share-group if we force-lose a context so we don't leak resources. * Fix a bug where we weren't deleting GL resources if the context was lost although we might still be able to make it current. Add a bunch of tests. BUG=475676 Review URL: https://codereview.chromium.org/1095893002 Cr-Commit-Position: refs/heads/master@{#327197}
* Change routing of UpdateVSyncParameters to the CommandBufferProxyImpl.danakj2015-02-201-2/+10
| | | | | | | | | | | | | This removes the BrowserCompositorOutputSurfaceProxy class. It adds a UpdateVSyncParameters callback to CommandBufferProxyImpl similar to its sibling SwapBuffersCompleted callback. R=sievers BUG=329552 Review URL: https://codereview.chromium.org/939373002 Cr-Commit-Position: refs/heads/master@{#317337}
* Add support for multithreading the GPU command buffer.jbauman2015-02-121-0/+8
| | | | | | | | The CommandBufferProxyImpl has a lock which is held on receiving messages from the GPU and must be held by any code that executes GPU commands if it can be used from multiple threads. Review URL: https://codereview.chromium.org/879403004 Cr-Commit-Position: refs/heads/master@{#315889}
* Add OrderingBarrierCHROMIUM API.vmiura2015-02-061-0/+2
| | | | | | | | | | | | | | | Implements a GPU Channel level command buffer barrier, which ensures ordering between channels, without immediately notifying the GPU service. Multiple Ordering Barriers can be combined into single IPCs to the GPU service, thus this API can be used in place of ShallowFlushCHROMIUM, to reduce IPC count and GPU service overhead. BUG=454500 Review URL: https://codereview.chromium.org/896723008 Cr-Commit-Position: refs/heads/master@{#315048}
* Standardize usage of virtual/override/final in content/dcheng2014-10-211-33/+32
| | | | | | | | | | | | This patch was automatically generated by applying clang fixit hints generated by the plugin to the source tree. BUG=417463 TBR=avi@chromium.org Review URL: https://codereview.chromium.org/671663002 Cr-Commit-Position: refs/heads/master@{#300461}
* gpu: Compositor management of GpuMemoryBuffer instances.reveman2014-10-131-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | This is a refactor of the CHROMIUM_image extension that allows the compositor to map/unmap GpuMemoryBuffers on worker threads and potentially also allocate these buffers on worker threads. CreateImageCHROMIUM now takes an opaque ClientBuffer as first parameter. ClientBuffer is implementation specific and in the case of chromium a gfx::GpuMemoryBuffer. Or more specifically a content::GpuMemoryBufferImpl when used with the content layer. This allows the compositor to allocate and use GpuMemoryBuffers without a GLES2Interface. A GpuMemoryBufferManager interface has been introduced. This interface provides a mechanism for the compositor to allocate GpuMemoryBuffer instances in the renderer and browser process. BUG=418553 Review URL: https://codereview.chromium.org/634083002 Cr-Commit-Position: refs/heads/master@{#299360}
* Remove GpuHostMsg_FrameDrawn and replace with client channel swap acksievers2014-10-091-0/+7
| | | | | | | | | | | | This also makes it unnecessary to signal a sync point callback for swap completion for browser compositor surfaces which is skipped now. BUG=417945 Review URL: https://codereview.chromium.org/628703005 Cr-Commit-Position: refs/heads/master@{#298972}
* Replace OVERRIDE and FINAL with override and final in content/common/[a-s]*anand.ratn2014-10-071-22/+22
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/630853003 Cr-Commit-Position: refs/heads/master@{#298453}
* gpu: Remove Echo and SwapCompletion GL interfacessievers2014-10-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | This functionality can be implemented with sync point callbacks. Now that swap completion is entirely an implementation detail of the OutputSurface this also allows for eliminating some IPC message redundancy. Ideally SwapCompletion would be unsolicited and also include LatencyInfo (where needed/supported). Also remove the message pattern matching logic in gpu_channel.cc for Flush/Echo. This kind of matching does not work reliably, since OnMessageReceived races with HandleMessage (i.e. the next msg might or might not be in deferred_messages_). Also, the original motivation in bug 407529 is described as making sure SwapBuffers gets handled immediately, which was separately fixed by merging the LatencyInfo with the Flush IPC. BUG=417945 Review URL: https://codereview.chromium.org/619453002 Cr-Commit-Position: refs/heads/master@{#297869}
* Merge GpuCommandBufferMsg_SetLatencyInfo into GpuCommandBufferMsg_AsyncFlushmiletus2014-09-151-0/+2
| | | | | | | | | | | | | | GpuCommandBufferMsg_SetLatencyInfo is used to send current frame's latencyinfo to gpu. We can piggyback the latencyinfo in GpuCommandBufferMsg_AsyncFlush so eliminate the extra IPC. BUG=404650 TEST=check trace that now GLRenderer::SwapBuffers only sends 2 IPC messages, i.e. AsyncFlush and Echo. And LatencyInfo tracking is still working. Review URL: https://codereview.chromium.org/564903002 Cr-Commit-Position: refs/heads/master@{#294895}
* When use the Pepper MapTexSubImage2DCHROMIUM() and the Compositor API ↵penghuang2014-09-091-0/+4
| | | | | | | | | | together, it may cause memory leak, and then run out of memory. The problem is because the Compositor API uses sync point to sync texture producer and the Chrome compositor, it does not need any IPC, so the PpapiCommandBufferProxy::last_state_[1] will not get updated, so the client does not known when the GPU process finishes accessing the memory, and then the memory can not be reused forever. This change add a shared state in PpapiCommandBufferProxy. It allows PpapiCommandBufferProxy updating state from a shared memory without an IPC. It fix this issue. BUG=411004 Review URL: https://codereview.chromium.org/547733002 Cr-Commit-Position: refs/heads/master@{#294012}
* gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER ↵reveman@chromium.org2014-07-181-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GpuMemoryBuffer type. This adds a new GpuMemoryBuffer type that can be used to create a GpuMemoryBuffer from an existing X11 pixmap. This removes Create/DeleteImage IPC and reduces complexity significantly as it allows the ImageManager to be moved to the decoder and simply track images. A new platform dependent GpuMemoryBufferFactory interface is introduced to allow this new type of buffer to be created on the GPU service side. To avoid the need for any global variables, this factory instance is also responsible for creating GLImage instances. The old factory interface used by android_webview is renamed InProcessGpuMemoryBufferFactory until it can be removed in favor of this new interface. BUG=368716 TEST=gpu_unittests, gl_tests --gtest_filter=GpuMemoryBufferTest.Lifecycle Review URL: https://codereview.chromium.org/331723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284097 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for strong future sync points.jbauman@chromium.org2014-07-011-0/+2
| | | | | | | | | | If InsertFutureSyncPoint() is used (this is only allowed from the browser process), the sync point will not be retired automatically but can be retired later manually with RetireSyncPoint. Any command buffer that waits on it before it's retired can wait indefinitely. BUG=365454 Review URL: https://codereview.chromium.org/284233008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280708 0039d316-1c4b-4281-b951-d872f2087c98
* Removed ManagedMemoryStats.vmpstr@chromium.org2014-06-191-2/+0
| | | | | | | | | | | | | As of r277056, the gpu memory manager is no longer using managed memory stats produced. This patch removes the managed memory stats calculation from the tile manager. As well, this patch removes ununsed gpu managed memory stats plumbing. BUG=377065 Review URL: https://codereview.chromium.org/342483007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278294 0039d316-1c4b-4281-b951-d872f2087c98
* Rearrange GLImage API to create them with a usage typealexst@chromium.org2014-05-061-5/+5
| | | | | | | | | | instead of using usage type while mapping the buffer. BUG= Review URL: https://codereview.chromium.org/255713008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268548 0039d316-1c4b-4281-b951-d872f2087c98
* gpu: Separate GpuControlService from GpuControlboliu@chromium.org2014-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Orignal goal of this CL is to make InProcessCommandBuffer::CreateGpuMemoryBuffer and DestroyGpuMemoryBuffer thread safe. Before this, Create runs on the client thread and Destroy runs on the service thread without any kind of synchronization. This change makes the division closer to the cross-process implementation, moving parts of the implementation from GpuControlService to GpuControl/InProcessViewRenderer. As a result, GpuControlService no longer needs to inherit GpuControl. And GLES2Decoder has enough information to decide on all gpu::Capabilities. Need to implement the bare minimum client GpuControl for gl_tests and gles2_conform_test. This currently involves some boilerplate and duplication. BUG=362346 Review URL: https://codereview.chromium.org/235563002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267753 0039d316-1c4b-4281-b951-d872f2087c98
* Remove CommandBuffer::GetStatepiman@chromium.org2014-04-301-1/+0
| | | | | | | | | | | | https://codereview.chromium.org/220243003 removed the last client-side caller. Service-side implementation of GetState is identical to GetLastState. So replace all instances of GetState by GetLastState and remove the former. BUG=None Review URL: https://codereview.chromium.org/253943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267027 0039d316-1c4b-4281-b951-d872f2087c98
* Make VEA client of command buffer; move sync. IPC to VDA/VEA::Initialize()sheu@chromium.org2014-04-031-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much refactoring of VDA/VEA. Issues: * Encoders will need to be able to synchronize with the 3D command buffer to support encoding from textures. * The IPC interface from GpuVideo{Decode,Encode}AcceleratorHost to GpuVideo{Decode,Encode}Accelerator collapses the creation and initialization IPC calls into one to save a round-trip. Unfortunately this synchronous IPC happens in the constructor, making the interface unwieldy (and requiring that initialization parameters be passed both on construction and initialization). Solutions: * Make the VEA a client of the command buffer. Harmonize GpuVideo{Decode,Encode}AcceleratorHost implementations to make codepaths parallel (and easier to reason about). * Move the synchronous IPC calls in the constructor of GpuV{D,E}AH into the Initialize() call, and remove the requirement that the initialization parameters be passed in the constructor. * Make VEA::Initialize() a 'bool' function call, as it is done in VDA, to allow Initialize() to be used synchronously. * (minor) remove SupportsWeakPtr from VDA interface. BUG=269312 TEST=local build, run, unittests on CrOS snow Review URL: https://codereview.chromium.org/185403020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261365 0039d316-1c4b-4281-b951-d872f2087c98
* Remove CommandBuffer::GetTransferBuffer.piman@chromium.org2014-04-011-9/+0
| | | | | | | | | | | | | | The only time we call GetTransferBuffer is on Pepper, right after CreateTransferBuffer, so combine the two. This lets us dramatically remove all the maintenance burden (maps) and extra IPCs. Also separate service-only calls out of CommandBuffer, into CommandBufferServiceBase BUG=None Review URL: https://codereview.chromium.org/215803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260806 0039d316-1c4b-4281-b951-d872f2087c98
* GPU: Reference count gpu::Buffer.epenner@chromium.org2014-03-261-4/+4
| | | | | | | | | | | | | | | | | We tend to duplicate shared memory within the same process when we don't need to, causing extra page faults etc when accessing the memory. With reference counting we can more easily re-use blocks of shared memory in the same process, and make security easier (objects in shared memory can hold a reference to their memory and prevent use-after-free). BUG=177063, 353822 Review URL: https://codereview.chromium.org/209353002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259491 0039d316-1c4b-4281-b951-d872f2087c98
* Replace command buffer FlushSync with WaitForTokenInRange and ↵jbauman@chromium.org2014-03-181-1/+2
| | | | | | | | | | | | WaitForGetOffsetInRange This allows the command-buffer interface to be more clear about what's happening, so we'll later be able to create IPCs that wait specifically for one of these events to happen. Currently both function are still implemented by looping on the GetStateFast IPC. BUG=349632 Review URL: https://codereview.chromium.org/189123004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257771 0039d316-1c4b-4281-b951-d872f2087c98