Changeset 127911 in webkit
- Timestamp:
- Sep 7, 2012 1:19:26 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r127907 r127911 1 2012-09-07 Arvid Nilsson <anilsson@rim.com> 2 3 [CSS Shaders] [BlackBerry] Refactor CustomFilterMesh and CustomFilter*Program 4 https://bugs.webkit.org/show_bug.cgi?id=94725 5 6 Reviewed by Rob Buis. 7 8 Separate the MeshGenerator from the CustomFilterMesh into 9 CustomFilterMeshGenerator.h/cpp. This allows the BlackBerry port to 10 reuse the mesh generator in its accelerated compositing implementation. 11 12 Also add support for creating a "PlatformCompiledProgram" from a 13 CustomFilterValidatedProgram, so the BlackBerry port can reuse the 14 shader validation code in its accelerated compositing implementation. 15 16 It turns out the GraphicsContext3D is not needed for ANGLE to function, 17 so this patch removes an ASSERT that required a context before 18 validating the shaders using ANGLE. This allows the BlackBerry port to 19 reuse the validation code without triggering the assert. In the future, 20 the validation code could be moved to a separate class to make it more 21 obvious that it isn't really related to GraphicsContext3D. 22 23 In general, this refactoring can be useful for any port that uses 24 OpenGL to implement accelerated compositing. 25 26 Inspired by an original patch by Joshua Netterfield. 27 28 No new tests, because this patch implements no new functionality. 29 30 * GNUmakefile.list.am: 31 * Target.pri: 32 * WebCore.gypi: 33 * WebCore.vcproj/WebCore.vcproj: 34 * WebCore.xcodeproj/project.pbxproj: 35 * platform/graphics/filters/CustomFilterGlobalContext.cpp: 36 (WebCore::CustomFilterGlobalContext::getValidatedProgram): 37 * platform/graphics/filters/CustomFilterMesh.cpp: 38 (WebCore::CustomFilterMesh::CustomFilterMesh): 39 * platform/graphics/filters/CustomFilterMeshGenerator.cpp: Added. 40 (WebCore): 41 (WebCore::CustomFilterMeshGenerator::CustomFilterMeshGenerator): 42 (WebCore::CustomFilterMeshGenerator::addAttachedMeshIndex): 43 (WebCore::CustomFilterMeshGenerator::generateAttachedMesh): 44 (WebCore::CustomFilterMeshGenerator::addDetachedMeshVertexAndIndex): 45 (WebCore::CustomFilterMeshGenerator::generateDetachedMesh): 46 (WebCore::CustomFilterMeshGenerator::addPositionAttribute): 47 (WebCore::CustomFilterMeshGenerator::addTexCoordAttribute): 48 (WebCore::CustomFilterMeshGenerator::addMeshCoordAttribute): 49 (WebCore::CustomFilterMeshGenerator::addTriangleCoordAttribute): 50 (WebCore::CustomFilterMeshGenerator::addAttachedMeshVertexAttributes): 51 (WebCore::CustomFilterMeshGenerator::addDetachedMeshVertexAttributes): 52 (WebCore::CustomFilterMeshGenerator::dumpBuffers): 53 * platform/graphics/filters/CustomFilterMeshGenerator.h: Added. 54 (WebCore): 55 (CustomFilterMeshGenerator): 56 (WebCore::CustomFilterMeshGenerator::vertices): 57 (WebCore::CustomFilterMeshGenerator::indices): 58 (WebCore::CustomFilterMeshGenerator::points): 59 (WebCore::CustomFilterMeshGenerator::pointsCount): 60 (WebCore::CustomFilterMeshGenerator::tiles): 61 (WebCore::CustomFilterMeshGenerator::tilesCount): 62 (WebCore::CustomFilterMeshGenerator::indicesCount): 63 (WebCore::CustomFilterMeshGenerator::floatsPerVertex): 64 (WebCore::CustomFilterMeshGenerator::verticesCount): 65 (WebCore::CustomFilterMeshGenerator::addTile): 66 * platform/graphics/filters/CustomFilterValidatedProgram.cpp: 67 (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram): 68 (WebCore::CustomFilterValidatedProgram::compiledProgram): 69 (WebCore::CustomFilterValidatedProgram::~CustomFilterValidatedProgram): 70 (WebCore): 71 (WebCore::CustomFilterValidatedProgram::platformCompiledProgram): 72 (WebCore::CustomFilterValidatedProgram::platformDestroy): 73 * platform/graphics/filters/CustomFilterValidatedProgram.h: 74 (WebCore): 75 (CustomFilterValidatedProgram): 76 * platform/graphics/filters/blackberry/CustomFilterValidatedProgramBlackBerry.cpp: Added. 77 (WebCore): 78 (WebCore::CustomFilterValidatedProgram::platformCompiledProgram): 79 (WebCore::CustomFilterValidatedProgram::platformDestroy): 80 1 81 2012-09-07 Dana Jansens <danakj@chromium.org> 2 82 -
trunk/Source/WebCore/GNUmakefile.list.am
r127889 r127911 4253 4253 Source/WebCore/platform/graphics/filters/CustomFilterMesh.cpp \ 4254 4254 Source/WebCore/platform/graphics/filters/CustomFilterMesh.h \ 4255 Source/WebCore/platform/graphics/filters/CustomFilterMeshGenerator.cpp \ 4256 Source/WebCore/platform/graphics/filters/CustomFilterMeshGenerator.h \ 4255 4257 Source/WebCore/platform/graphics/filters/CustomFilterNumberParameter.h \ 4256 4258 Source/WebCore/platform/graphics/filters/CustomFilterOperation.cpp \ -
trunk/Source/WebCore/Target.pri
r127877 r127911 2045 2045 platform/graphics/filters/CustomFilterGlobalContext.h \ 2046 2046 platform/graphics/filters/CustomFilterMesh.h \ 2047 platform/graphics/filters/CustomFilterMeshGenerator.h \ 2047 2048 platform/graphics/filters/CustomFilterNumberParameter.h \ 2048 2049 platform/graphics/filters/CustomFilterCompiledProgram.h \ … … 3447 3448 platform/graphics/filters/CustomFilterCompiledProgram.cpp \ 3448 3449 platform/graphics/filters/CustomFilterMesh.cpp \ 3450 platform/graphics/filters/CustomFilterMeshGenerator.cpp \ 3449 3451 platform/graphics/filters/CustomFilterValidatedProgram.cpp \ 3450 3452 platform/graphics/filters/DistantLightSource.cpp \ -
trunk/Source/WebCore/WebCore.gypi
r127891 r127911 4913 4913 'platform/graphics/filters/CustomFilterGlobalContext.h', 4914 4914 'platform/graphics/filters/CustomFilterMesh.h', 4915 'platform/graphics/filters/CustomFilterMeshGenerator.h', 4915 4916 'platform/graphics/filters/CustomFilterNumberParameter.h', 4916 4917 'platform/graphics/filters/CustomFilterOperation.cpp', … … 4926 4927 'platform/graphics/filters/CustomFilterValidatedProgram.h', 4927 4928 'platform/graphics/filters/CustomFilterMesh.cpp', 4929 'platform/graphics/filters/CustomFilterMeshGenerator.cpp', 4928 4930 'platform/graphics/filters/CustomFilterTransformParameter.h', 4929 4931 'platform/graphics/filters/DistantLightSource.cpp', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r127869 r127911 31886 31886 </File> 31887 31887 <File 31888 RelativePath="..\platform\graphics\filters\CustomFilterMeshGenerator.cpp" 31889 > 31890 </File> 31891 <File 31892 RelativePath="..\platform\graphics\filters\CustomFilterMeshGenerator.h" 31893 > 31894 </File> 31895 <File 31888 31896 RelativePath="..\platform\graphics\filters\CustomFilterNumberParameter.h" 31889 31897 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r127869 r127911 1988 1988 7BD117EC15B8DB0100C974A3 /* DOMTransactionStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BD117EA15B8DB0100C974A3 /* DOMTransactionStep.h */; }; 1989 1989 7C522D4B15B477E8009B7C95 /* InspectorOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */; }; 1990 7E12E90F15FA5D3A005E4126 /* CustomFilterMeshGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E12E90D15FA5D3A005E4126 /* CustomFilterMeshGenerator.h */; }; 1991 7E12E91015FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E12E90E15FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp */; }; 1990 1992 7E33CD01127F340D00BE8F17 /* PurgePriority.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E33CD00127F340D00BE8F17 /* PurgePriority.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1991 1993 7E37EF2E1339208800B29250 /* SubresourceLoaderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */; }; … … 9193 9195 7C522D4A15B478B2009B7C95 /* InspectorOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorOverlay.h; sourceTree = "<group>"; }; 9194 9196 7C60128060078BB70E367A95 /* DNSResolveQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNSResolveQueue.cpp; sourceTree = "<group>"; }; 9197 7E12E90D15FA5D3A005E4126 /* CustomFilterMeshGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomFilterMeshGenerator.h; path = filters/CustomFilterMeshGenerator.h; sourceTree = "<group>"; }; 9198 7E12E90E15FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CustomFilterMeshGenerator.cpp; path = filters/CustomFilterMeshGenerator.cpp; sourceTree = "<group>"; }; 9195 9199 7E33CD00127F340D00BE8F17 /* PurgePriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurgePriority.h; sourceTree = "<group>"; }; 9196 9200 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SubresourceLoaderCF.cpp; path = cf/SubresourceLoaderCF.cpp; sourceTree = "<group>"; }; … … 18151 18155 isa = PBXGroup; 18152 18156 children = ( 18157 7E12E90D15FA5D3A005E4126 /* CustomFilterMeshGenerator.h */, 18158 7E12E90E15FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp */, 18153 18159 509EC10815E848CA00E82581 /* CustomFilterTransformParameter.h */, 18154 18160 49ECEB5C1499790D00CDD3A4 /* arm */, … … 25512 25518 0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */, 25513 25519 4F377FF515FA356A00E5D60D /* WebCoreMemoryInstrumentation.h in Headers */, 25520 7E12E90F15FA5D3A005E4126 /* CustomFilterMeshGenerator.h in Headers */, 25514 25521 ); 25515 25522 runOnlyForDeploymentPostprocessing = 0; … … 28604 28611 76F2E2EB15F74CEF005FF664 /* RenderDialog.cpp in Sources */, 28605 28612 0F605AEC15F94848004DF0C0 /* ScrollingConstraints.cpp in Sources */, 28613 7E12E91015FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp in Sources */, 28606 28614 ); 28607 28615 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/platform/graphics/filters/CustomFilterGlobalContext.cpp
r127217 r127911 88 88 PassRefPtr<CustomFilterValidatedProgram> CustomFilterGlobalContext::getValidatedProgram(const CustomFilterProgramInfo& programInfo) 89 89 { 90 // Check that the context is already prepared.91 ASSERT(m_context);92 93 90 CustomFilterValidatedProgramsMap::iterator iter = m_programs.find(programInfo); 94 91 if (iter != m_programs.end()) -
trunk/Source/WebCore/platform/graphics/filters/CustomFilterMesh.cpp
r122189 r127911 32 32 #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) 33 33 #include "CustomFilterMesh.h" 34 #include "CustomFilterMeshGenerator.h" 34 35 #include "GraphicsContext3D.h" 35 36 36 37 namespace WebCore { 37 38 #ifndef NDEBUG39 // Use "call 'WebCore::s_dumpCustomFilterMeshBuffers' = 1" in GDB to activate printing of the mesh buffers.40 static bool s_dumpCustomFilterMeshBuffers = false;41 #endif42 38 43 class MeshGenerator { 44 public: 45 // Lines and columns are the values passed in CSS. The result is vertex mesh that has 'rows' numbers of rows 46 // and 'columns' number of columns with a total of 'rows + 1' * 'columns + 1' vertices. 47 // MeshBox is the filtered area calculated defined using the border-box, padding-box, content-box or filter-box 48 // attributes. A value of (0, 0, 1, 1) will cover the entire output surface. 49 MeshGenerator(unsigned columns, unsigned rows, const FloatRect& meshBox, CustomFilterOperation::MeshType meshType) 50 : m_meshType(meshType) 51 , m_points(columns + 1, rows + 1) 52 , m_tiles(columns, rows) 53 , m_tileSizeInPixels(meshBox.width() / m_tiles.width(), meshBox.height() / m_tiles.height()) 54 , m_tileSizeInDeviceSpace(1.0f / m_tiles.width(), 1.0f / m_tiles.height()) 55 , m_meshBox(meshBox) 56 { 57 // Build the two buffers needed to draw triangles: 58 // * m_vertices has a number of float attributes that will be passed to the vertex shader 59 // for each computed vertex. This number is calculated in floatsPerVertex() based on the meshType. 60 // * m_indices is a buffer that will have 3 indices per triangle. Each index will point inside 61 // the m_vertices buffer. 62 m_vertices.reserveCapacity(verticesCount() * floatsPerVertex()); 63 m_indices.reserveCapacity(indicesCount()); 64 65 // Based on the meshType there can be two types of meshes. 66 // * attached: each triangle uses vertices from the neighbor triangles. This is useful to save some GPU memory 67 // when there's no need to explode the tiles. 68 // * detached: each triangle has its own vertices. This means each triangle can be moved independently and a vec3 69 // attribute is passed, so that each vertex can be uniquely identified. 70 if (m_meshType == CustomFilterOperation::ATTACHED) 71 generateAttachedMesh(); 72 else 73 generateDetachedMesh(); 74 75 #ifndef NDEBUG 76 if (s_dumpCustomFilterMeshBuffers) 77 dumpBuffers(); 78 #endif 79 } 80 81 const Vector<float>& vertices() const { return m_vertices; } 82 const Vector<uint16_t>& indices() const { return m_indices; } 83 84 const IntSize& points() const { return m_points; } 85 unsigned pointsCount() const { return m_points.width() * m_points.height(); } 86 87 const IntSize& tiles() const { return m_tiles; } 88 unsigned tilesCount() const { return m_tiles.width() * m_tiles.height(); } 89 90 unsigned indicesCount() const 91 { 92 const unsigned trianglesPerTile = 2; 93 const unsigned indicesPerTriangle = 3; 94 return tilesCount() * trianglesPerTile * indicesPerTriangle; 95 } 96 97 unsigned floatsPerVertex() const 98 { 99 static const unsigned AttachedMeshVertexSize = 4 + // vec4 a_position 100 2 + // vec2 a_texCoord 101 2; // vec2 a_meshCoord 102 103 static const unsigned DetachedMeshVertexSize = AttachedMeshVertexSize + 104 3; // vec3 a_triangleCoord 105 106 return m_meshType == CustomFilterOperation::ATTACHED ? AttachedMeshVertexSize : DetachedMeshVertexSize; 107 } 108 109 unsigned verticesCount() const 110 { 111 return m_meshType == CustomFilterOperation::ATTACHED ? pointsCount() : indicesCount(); 112 } 113 114 private: 115 typedef void (MeshGenerator::*AddTriangleVertexFunction)(int quadX, int quadY, int triangleX, int triangleY, int triangle); 116 117 template <AddTriangleVertexFunction addTriangleVertex> 118 void addTile(int quadX, int quadY) 119 { 120 ((*this).*(addTriangleVertex))(quadX, quadY, 0, 0, 1); 121 ((*this).*(addTriangleVertex))(quadX, quadY, 1, 0, 2); 122 ((*this).*(addTriangleVertex))(quadX, quadY, 1, 1, 3); 123 ((*this).*(addTriangleVertex))(quadX, quadY, 0, 0, 4); 124 ((*this).*(addTriangleVertex))(quadX, quadY, 1, 1, 5); 125 ((*this).*(addTriangleVertex))(quadX, quadY, 0, 1, 6); 126 } 127 128 void addAttachedMeshIndex(int quadX, int quadY, int triangleX, int triangleY, int triangle) 129 { 130 UNUSED_PARAM(triangle); 131 m_indices.append((quadY + triangleY) * m_points.width() + (quadX + triangleX)); 132 } 133 134 void generateAttachedMesh() 135 { 136 for (int j = 0; j < m_points.height(); ++j) { 137 for (int i = 0; i < m_points.width(); ++i) 138 addAttachedMeshVertexAttributes(i, j); 139 } 140 141 for (int j = 0; j < m_tiles.height(); ++j) { 142 for (int i = 0; i < m_tiles.width(); ++i) 143 addTile<&MeshGenerator::addAttachedMeshIndex>(i, j); 144 } 145 } 146 147 void addDetachedMeshVertexAndIndex(int quadX, int quadY, int triangleX, int triangleY, int triangle) 148 { 149 addDetachedMeshVertexAttributes(quadX, quadY, triangleX, triangleY, triangle); 150 m_indices.append(m_indices.size()); 151 } 152 153 void generateDetachedMesh() 154 { 155 for (int j = 0; j < m_tiles.height(); ++j) { 156 for (int i = 0; i < m_tiles.width(); ++i) 157 addTile<&MeshGenerator::addDetachedMeshVertexAndIndex>(i, j); 158 } 159 } 160 161 void addPositionAttribute(int quadX, int quadY) 162 { 163 // vec4 a_position 164 m_vertices.append(m_tileSizeInPixels.width() * quadX - 0.5f + m_meshBox.x()); 165 m_vertices.append(m_tileSizeInPixels.height() * quadY - 0.5f + m_meshBox.y()); 166 m_vertices.append(0.0f); // z 167 m_vertices.append(1.0f); 168 } 169 170 void addTexCoordAttribute(int quadX, int quadY) 171 { 172 // vec2 a_texCoord 173 m_vertices.append(m_tileSizeInPixels.width() * quadX + m_meshBox.x()); 174 m_vertices.append(m_tileSizeInPixels.height() * quadY + m_meshBox.y()); 175 } 176 177 void addMeshCoordAttribute(int quadX, int quadY) 178 { 179 // vec2 a_meshCoord 180 m_vertices.append(m_tileSizeInDeviceSpace.width() * quadX); 181 m_vertices.append(m_tileSizeInDeviceSpace.height() * quadY); 182 } 183 184 void addTriangleCoordAttribute(int quadX, int quadY, int triangle) 185 { 186 // vec3 a_triangleCoord 187 m_vertices.append(quadX); 188 m_vertices.append(quadY); 189 m_vertices.append(triangle); 190 } 191 192 void addAttachedMeshVertexAttributes(int quadX, int quadY) 193 { 194 addPositionAttribute(quadX, quadY); 195 addTexCoordAttribute(quadX, quadY); 196 addMeshCoordAttribute(quadX, quadY); 197 } 198 199 void addDetachedMeshVertexAttributes(int quadX, int quadY, int triangleX, int triangleY, int triangle) 200 { 201 addAttachedMeshVertexAttributes(quadX + triangleX, quadY + triangleY); 202 addTriangleCoordAttribute(quadX, quadY, triangle); 203 } 204 205 #ifndef NDEBUG 206 void dumpBuffers() const 207 { 208 printf("Mesh buffers: Points.width(): %d, Points.height(): %d meshBox: %f, %f, %f, %f, type: %s\n", 209 m_points.width(), m_points.height(), m_meshBox.x(), m_meshBox.y(), m_meshBox.width(), m_meshBox.height(), 210 (m_meshType == CustomFilterOperation::ATTACHED) ? "Attached" : "Detached"); 211 printf("---Vertex:\n\t"); 212 for (unsigned i = 0; i < m_vertices.size(); ++i) { 213 printf("%f ", m_vertices.at(i)); 214 if (!((i + 1) % floatsPerVertex())) 215 printf("\n\t"); 216 } 217 printf("\n---Indices: "); 218 for (unsigned i = 0; i < m_indices.size(); ++i) 219 printf("%d ", m_indices.at(i)); 220 printf("\n"); 221 } 222 #endif 223 224 private: 225 Vector<float> m_vertices; 226 Vector<uint16_t> m_indices; 227 228 CustomFilterOperation::MeshType m_meshType; 229 IntSize m_points; 230 IntSize m_tiles; 231 FloatSize m_tileSizeInPixels; 232 FloatSize m_tileSizeInDeviceSpace; 233 FloatRect m_meshBox; 234 }; 235 236 CustomFilterMesh::CustomFilterMesh(GraphicsContext3D* context, unsigned columns, unsigned rows, 39 CustomFilterMesh::CustomFilterMesh(GraphicsContext3D* context, unsigned columns, unsigned rows, 237 40 const FloatRect& meshBox, CustomFilterOperation::MeshType meshType) 238 41 : m_context(context) … … 242 45 , m_meshType(meshType) 243 46 { 244 MeshGenerator generator(columns, rows, meshBox, meshType);47 CustomFilterMeshGenerator generator(columns, rows, meshBox, meshType); 245 48 m_indicesCount = generator.indicesCount(); 246 49 m_bytesPerVertex = generator.floatsPerVertex() * sizeof(float); -
trunk/Source/WebCore/platform/graphics/filters/CustomFilterValidatedProgram.cpp
r127540 r127911 71 71 : m_globalContext(globalContext) 72 72 , m_programInfo(programInfo) 73 , m_platformCompiledProgram(0) 73 74 , m_isInitialized(false) 74 75 { … … 103 104 PassRefPtr<CustomFilterCompiledProgram> CustomFilterValidatedProgram::compiledProgram() 104 105 { 105 ASSERT(m_isInitialized && !m_validatedVertexShader.isNull() && !m_validatedFragmentShader.isNull());106 ASSERT(m_isInitialized && m_globalContext && !m_validatedVertexShader.isNull() && !m_validatedFragmentShader.isNull()); 106 107 if (!m_compiledProgram) 107 108 m_compiledProgram = CustomFilterCompiledProgram::create(m_globalContext->context(), m_validatedVertexShader, m_validatedFragmentShader); … … 264 265 CustomFilterValidatedProgram::~CustomFilterValidatedProgram() 265 266 { 267 platformDestroy(); 268 266 269 if (m_globalContext) 267 270 m_globalContext->removeValidatedProgram(this); 268 271 } 269 272 273 #if !PLATFORM(BLACKBERRY) 274 PlatformCompiledProgram* CustomFilterValidatedProgram::platformCompiledProgram() 275 { 276 return 0; 277 } 278 279 void CustomFilterValidatedProgram::platformDestroy() 280 { 281 } 282 #endif 283 270 284 } // namespace WebCore 271 285 -
trunk/Source/WebCore/platform/graphics/filters/CustomFilterValidatedProgram.h
r127217 r127911 40 40 #include <wtf/text/WTFString.h> 41 41 42 // PlatformCompiledProgram defines a type that is compatible with the framework used to implement accelerated compositing on a particular platform. 43 #if PLATFORM(BLACKBERRY) 44 namespace WebCore { 45 class LayerCompiledProgram; 46 } 47 typedef WebCore::LayerCompiledProgram PlatformCompiledProgram; 48 #else 49 typedef void PlatformCompiledProgram; 50 #endif 51 42 52 namespace WebCore { 43 53 … … 72 82 PassRefPtr<CustomFilterCompiledProgram> compiledProgram(); 73 83 84 PlatformCompiledProgram* platformCompiledProgram(); 85 74 86 bool isInitialized() const { return m_isInitialized; } 75 87 … … 79 91 private: 80 92 CustomFilterValidatedProgram(CustomFilterGlobalContext*, const CustomFilterProgramInfo&); 93 94 void platformDestroy(); 81 95 82 96 static String defaultVertexShaderString(); … … 96 110 97 111 RefPtr<CustomFilterCompiledProgram> m_compiledProgram; 112 PlatformCompiledProgram* m_platformCompiledProgram; 98 113 99 114 bool m_isInitialized;
Note: See TracChangeset
for help on using the changeset viewer.