12011-10-27 David Reveman <reveman@chromium.org>
2
3 [Chromium] Paint directly to shared memory.
4 https://bugs.webkit.org/show_bug.cgi?id=71023
5
6 Reviewed by NOBODY (OOPS!).
7
8 Plumbing to allow allocation of compositor resources before painting
9 of layer contents. Add mapTexSubImage2D interface to ManagedTexture
10 class and new LayerTextureUpdaterShm class that render directly
11 to mapped memory.
12
13 No new tests. Covered by existing tests.
14
15 * platform/graphics/chromium/ContentLayerChromium.cpp:
16 (WebCore::ContentLayerChromium::prepareToPaintContents):
17 (WebCore::ContentLayerChromium::paintContentsIfDirty):
18 (WebCore::ContentLayerChromium::createTextureUpdater):
19 * platform/graphics/chromium/ContentLayerChromium.h:
20 * platform/graphics/chromium/ImageLayerChromium.cpp:
21 (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
22 (WebCore::ImageLayerTextureUpdater::prepareToUpdateRect):
23 (WebCore::ImageLayerTextureUpdater::paintContents):
24 (WebCore::ImageLayerTextureUpdater::paintTextureRect):
25 (WebCore::ImageLayerChromium::prepareToPaintContents):
26 (WebCore::ImageLayerChromium::paintContentsIfDirty):
27 * platform/graphics/chromium/ImageLayerChromium.h:
28 * platform/graphics/chromium/LayerChromium.h:
29 (WebCore::LayerChromium::prepareToPaintContents):
30 (WebCore::LayerChromium::prepareCompositorResources):
31 * platform/graphics/chromium/LayerTextureUpdater.h:
32 * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
33 (WebCore::LayerTextureUpdaterCanvas::paint):
34 (WebCore::LayerTextureUpdaterBitmap::prepareToUpdate):
35 (WebCore::LayerTextureUpdaterBitmap::paintContents):
36 (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
37 (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture):
38 (WebCore::LayerTextureUpdaterSkPicture::paintContents):
39 (WebCore::LayerTextureUpdaterSkPicture::drawPicture):
40 (WebCore::LayerTextureUpdaterSharedMemory::create):
41 (WebCore::LayerTextureUpdaterSharedMemory::LayerTextureUpdaterSharedMemory):
42 (WebCore::LayerTextureUpdaterSharedMemory::sampledTexelFormat):
43 (WebCore::LayerTextureUpdaterSharedMemory::prepareToUpdateRect):
44 (WebCore::LayerTextureUpdaterSharedMemory::paintTextureRect):
45 (WebCore::LayerTextureUpdaterSharedMemory::updateTextureRect):
46 (WebCore::LayerTextureUpdaterFramebuffer::create):
47 (WebCore::LayerTextureUpdaterFramebuffer::LayerTextureUpdaterFramebuffer):
48 (WebCore::LayerTextureUpdaterFramebuffer::~LayerTextureUpdaterFramebuffer):
49 (WebCore::LayerTextureUpdaterFramebuffer::sampledTexelFormat):
50 (WebCore::LayerTextureUpdaterFramebuffer::updateTextureRect):
51 * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
52 (WebCore::LayerTextureUpdaterBitmap::prepareToUpdateRect):
53 (WebCore::LayerTextureUpdaterBitmap::paintTextureRect):
54 (WebCore::LayerTextureUpdaterSharedMemory::orientation):
55 (WebCore::LayerTextureUpdaterSharedMemory::prepareToUpdate):
56 (WebCore::LayerTextureUpdaterFramebuffer::prepareToUpdate):
57 (WebCore::LayerTextureUpdaterFramebuffer::prepareToUpdateRect):
58 (WebCore::LayerTextureUpdaterFramebuffer::paintTextureRect):
59 * platform/graphics/chromium/ManagedTexture.cpp:
60 (WebCore::ManagedTexture::ManagedTexture):
61 (WebCore::ManagedTexture::~ManagedTexture):
62 (WebCore::ManagedTexture::mapTexSubImage2D):
63 (WebCore::ManagedTexture::unmapTexSubImage2D):
64 * platform/graphics/chromium/ManagedTexture.h:
65 (WebCore::ManagedTexture::mappedBuffer):
66 * platform/graphics/chromium/TiledLayerChromium.cpp:
67 (WebCore::TiledLayerChromium::prepareCompositorResources):
68 (WebCore::TiledLayerChromium::updateCompositorResources):
69 (WebCore::TiledLayerChromium::prepareToUpdate):
70 (WebCore::TiledLayerChromium::paintContents):
71 * platform/graphics/chromium/TiledLayerChromium.h:
72 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
73 (WebCore::CCLayerTreeHost::prepareToUpdateLayers):
74 (WebCore::CCLayerTreeHost::updateLayers):
75 (WebCore::prepareToPaintContents):
76 (WebCore::CCLayerTreeHost::prepareToPaintMaskAndReplicaForRenderSurface):
77 (WebCore::CCLayerTreeHost::prepareToPaintLayerContents):
78 (WebCore::paintContentsIfDirty):
79 (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
80 (WebCore::CCLayerTreeHost::paintLayerContents):
81 (WebCore::CCLayerTreeHost::prepareCompositorResources):
82 (WebCore::CCLayerTreeHost::updateCompositorResources):
83 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
84 (WebCore::CCSettings::CCSettings):
85 * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
86 (WebCore::CCSingleThreadProxy::commitIfNeeded):
87 * platform/graphics/chromium/cc/CCThreadProxy.cpp:
88 (WebCore::CCThreadProxy::beginFrameAndCommit):
89 (WebCore::CCThreadProxy::allocateOnImplThread):
90 * platform/graphics/chromium/cc/CCThreadProxy.h:
91