| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 TextureAllocator* contentsTextureAllocator() const { return m_contentsTextur
eAllocator.get(); } | 137 TextureAllocator* contentsTextureAllocator() const { return m_contentsTextur
eAllocator.get(); } |
| 138 | 138 |
| 139 CCHeadsUpDisplay* headsUpDisplay() { return m_headsUpDisplay.get(); } | 139 CCHeadsUpDisplay* headsUpDisplay() { return m_headsUpDisplay.get(); } |
| 140 | 140 |
| 141 void setScissorToRect(const IntRect&); | 141 void setScissorToRect(const IntRect&); |
| 142 | 142 |
| 143 String layerTreeAsText() const; | 143 String layerTreeAsText() const; |
| 144 | 144 |
| 145 bool isContextLost(); | 145 bool isContextLost(); |
| 146 | 146 |
| 147 void releaseRenderSurfaceTextures(); | 147 void setVisible(bool); |
| 148 | 148 |
| 149 GC3Denum bestTextureFormat(); | 149 GC3Denum bestTextureFormat(); |
| 150 | 150 |
| 151 typedef Vector<RefPtr<CCLayerImpl> > CCLayerList; | 151 typedef Vector<RefPtr<CCLayerImpl> > CCLayerList; |
| 152 | 152 |
| 153 static void toGLMatrix(float*, const TransformationMatrix&); | 153 static void toGLMatrix(float*, const TransformationMatrix&); |
| 154 void drawTexturedQuad(const TransformationMatrix& layerMatrix, | 154 void drawTexturedQuad(const TransformationMatrix& layerMatrix, |
| 155 float width, float height, float opacity, const FloatQ
uad&, | 155 float width, float height, float opacity, const FloatQ
uad&, |
| 156 int matrixLocation, int alphaLocation, int quadLocatio
n); | 156 int matrixLocation, int alphaLocation, int quadLocatio
n); |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 LayerRendererChromium(CCLayerTreeHostImpl*, PassRefPtr<GraphicsContext3D>); | 159 LayerRendererChromium(CCLayerTreeHostImpl*, PassRefPtr<GraphicsContext3D>); |
| 160 bool initialize(); | 160 bool initialize(); |
| 161 | 161 |
| 162 void drawLayersInternal(); | 162 void drawLayersInternal(); |
| 163 void drawLayer(CCLayerImpl*, CCRenderSurface*); | 163 void drawLayer(CCLayerImpl*, CCRenderSurface*); |
| 164 | 164 |
| 165 ManagedTexture* getOffscreenLayerTexture(); | 165 ManagedTexture* getOffscreenLayerTexture(); |
| 166 void copyOffscreenTextureToDisplay(); | 166 void copyOffscreenTextureToDisplay(); |
| 167 | 167 |
| 168 bool isLayerVisible(LayerChromium*, const TransformationMatrix&, const IntRe
ct& visibleRect); | 168 bool isLayerVisible(LayerChromium*, const TransformationMatrix&, const IntRe
ct& visibleRect); |
| 169 | 169 |
| 170 void setDrawViewportRect(const IntRect&, bool flipY); | 170 void setDrawViewportRect(const IntRect&, bool flipY); |
| 171 | 171 |
| 172 void releaseRenderSurfaceTextures(); |
| 173 |
| 172 bool useRenderSurface(CCRenderSurface*); | 174 bool useRenderSurface(CCRenderSurface*); |
| 173 | 175 |
| 174 bool makeContextCurrent(); | 176 bool makeContextCurrent(); |
| 175 | 177 |
| 176 static bool compareLayerZ(const RefPtr<CCLayerImpl>&, const RefPtr<CCLayerIm
pl>&); | 178 static bool compareLayerZ(const RefPtr<CCLayerImpl>&, const RefPtr<CCLayerIm
pl>&); |
| 177 | 179 |
| 178 void dumpRenderSurfaces(TextStream&, int indent, const CCLayerImpl*) const; | 180 void dumpRenderSurfaces(TextStream&, int indent, const CCLayerImpl*) const; |
| 179 | 181 |
| 180 bool initializeSharedObjects(); | 182 bool initializeSharedObjects(); |
| 181 void cleanupSharedObjects(); | 183 void cleanupSharedObjects(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 #else | 241 #else |
| 240 #define GLC(context, x) (x) | 242 #define GLC(context, x) (x) |
| 241 #endif | 243 #endif |
| 242 | 244 |
| 243 | 245 |
| 244 } | 246 } |
| 245 | 247 |
| 246 #endif // USE(ACCELERATED_COMPOSITING) | 248 #endif // USE(ACCELERATED_COMPOSITING) |
| 247 | 249 |
| 248 #endif | 250 #endif |
| OLD | NEW |