summaryrefslogtreecommitdiffstats
path: root/cc/resources/shared_bitmap.h
Commit message (Collapse)AuthorAgeFilesLines
* Allow creating SharedBitmaps backed by new[]jbauman@chromium.org2014-05-301-1/+6
| | | | | | | | | | Bitmaps allocated in the browser process may have to be shared between compositors (for surfaces) but not between processes, so they should be backed by new[] and use the SharedBitmap mechanism. BUG= Review URL: https://codereview.chromium.org/307973004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273743 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 261972 "Revert 261817 "cc: Remove all usage of GetArea() ..."scottmg@chromium.org2014-04-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r261817 falsely accused! Reverting the revert, sorry for the noise. > Revert 261817 "cc: Remove all usage of GetArea() from production..." > > Suspected of causing failures on Linux CrOS ASan LSan: > > http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASan%2BLSan%20Tests%20%283%29/builds/702 > > http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASan%2BLSan%20Tests%20%282%29/builds/664 > > http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASan%2BLSan%20Tests%20%281%29/builds/702 > > > > cc: Remove all usage of GetArea() from production code in cc > > > > Consolidate the calls to turn gfx::Size into a number of bytes onto > > the cc::SharedBitmap class. The class offers the following methods: > > 1. Get a size_t bytes and bool saying if you overflowed or not. > > 2. Get a size_t bytes and crash if you overflow. > > 3. Get a size_t bytes and don't check for overflow. > > 4. Tell me if the gfx::Size would overflow to create the size_t bytes. > > > > These were the use cases I found in the existing code, plus the > > addition of case 2. A few places that were finding the size_t bytes > > without looking for overflow (case 3), from a previously-unchecked > > gfx::Size, were changed to crash on overflow instead (case 2). > > > > R=jbauman@chromium.org, piman@chromium.org > > BUG=348332 > > > > Review URL: https://codereview.chromium.org/221523003 > > TBR=danakj@chromium.org > > Review URL: https://codereview.chromium.org/226693005 TBR=scottmg@chromium.org, danakj@chromium.org Review URL: https://codereview.chromium.org/226693007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262022 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 261817 "cc: Remove all usage of GetArea() from production..."scottmg@chromium.org2014-04-051-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suspected of causing failures on Linux CrOS ASan LSan: http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASan%2BLSan%20Tests%20%283%29/builds/702 http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASan%2BLSan%20Tests%20%282%29/builds/664 http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASan%2BLSan%20Tests%20%281%29/builds/702 > cc: Remove all usage of GetArea() from production code in cc > > Consolidate the calls to turn gfx::Size into a number of bytes onto > the cc::SharedBitmap class. The class offers the following methods: > 1. Get a size_t bytes and bool saying if you overflowed or not. > 2. Get a size_t bytes and crash if you overflow. > 3. Get a size_t bytes and don't check for overflow. > 4. Tell me if the gfx::Size would overflow to create the size_t bytes. > > These were the use cases I found in the existing code, plus the > addition of case 2. A few places that were finding the size_t bytes > without looking for overflow (case 3), from a previously-unchecked > gfx::Size, were changed to crash on overflow instead (case 2). > > R=jbauman@chromium.org, piman@chromium.org > BUG=348332 > > Review URL: https://codereview.chromium.org/221523003 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/226693005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261972 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove all usage of GetArea() from production code in ccdanakj@chromium.org2014-04-041-3/+11
| | | | | | | | | | | | | | | | | | | | | Consolidate the calls to turn gfx::Size into a number of bytes onto the cc::SharedBitmap class. The class offers the following methods: 1. Get a size_t bytes and bool saying if you overflowed or not. 2. Get a size_t bytes and crash if you overflow. 3. Get a size_t bytes and don't check for overflow. 4. Tell me if the gfx::Size would overflow to create the size_t bytes. These were the use cases I found in the existing code, plus the addition of case 2. A few places that were finding the size_t bytes without looking for overflow (case 3), from a previously-unchecked gfx::Size, were changed to crash on overflow instead (case 2). R=jbauman@chromium.org, piman@chromium.org BUG=348332 Review URL: https://codereview.chromium.org/221523003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261817 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 257161 "Revert 256955 "Add shared bitmap managers for bro..."jbauman@chromium.org2014-03-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out the child process was mapping the memory twice, so fixed that. > Revert 256955 "Add shared bitmap managers for browser and render..." > > Seems to be causing renderer crashes and possibly out-of-memory issues. > > > Add shared bitmap managers for browser and renderer processes. > > > > The shared bitmap managers will allow software tiles to be allocated in shared memory, so delegated rendering could be used with them. > > > > BUG=327220 > > R=danakj@chromium.org, jschuh@chromium.org, piman@chromium.org > > > > Review URL: https://codereview.chromium.org/148243013 > > TBR=jbauman@chromium.org > > Review URL: https://codereview.chromium.org/197703004 TBR=jbauman@chromium.org Review URL: https://codereview.chromium.org/200913002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257216 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 256955 "Add shared bitmap managers for browser and render..."jbauman@chromium.org2014-03-141-6/+0
| | | | | | | | | | | | | | | | | | | | Seems to be causing renderer crashes and possibly out-of-memory issues. > Add shared bitmap managers for browser and renderer processes. > > The shared bitmap managers will allow software tiles to be allocated in shared memory, so delegated rendering could be used with them. > > BUG=327220 > R=danakj@chromium.org, jschuh@chromium.org, piman@chromium.org > > Review URL: https://codereview.chromium.org/148243013 TBR=jbauman@chromium.org BUG=352689,352616,352618 Review URL: https://codereview.chromium.org/197703004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257161 0039d316-1c4b-4281-b951-d872f2087c98
* Add shared bitmap managers for browser and renderer processes.jbauman@chromium.org2014-03-131-0/+6
| | | | | | | | | | | The shared bitmap managers will allow software tiles to be allocated in shared memory, so delegated rendering could be used with them. BUG=327220 R=danakj@chromium.org, jschuh@chromium.org, piman@chromium.org Review URL: https://codereview.chromium.org/148243013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256955 0039d316-1c4b-4281-b951-d872f2087c98
* Add delegated rendering support for software renderer.jbauman@chromium.org2013-10-221-0/+51
This patch adds support to cc/ for delegated rendering with a software compositor. A new SharedBitmapManager is added, which will create SharedBitmaps with unique IDs in shared memory. These can be filled in the child, and their IDs can be sent to the browser so it can map them and draw from them. No implementations of the SharedBitmapManager are added in this patch, so delegated rendering support won't work in practice yet, and it will fall back to not allocating anything in shared memory. BUG= Review URL: https://codereview.chromium.org/24632004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230245 0039d316-1c4b-4281-b951-d872f2087c98