Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h

Issue 7274032: Merge 89635 - 2011-06-23 John Bates <jbates@google.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 CCHeadsUpDisplay* headsUpDisplay() { return m_headsUpDisplay.get(); } 142 CCHeadsUpDisplay* headsUpDisplay() { return m_headsUpDisplay.get(); }
143 143
144 void setScissorToRect(const IntRect&); 144 void setScissorToRect(const IntRect&);
145 145
146 String layerTreeAsText() const; 146 String layerTreeAsText() const;
147 147
148 void addChildContext(GraphicsContext3D*); 148 void addChildContext(GraphicsContext3D*);
149 void removeChildContext(GraphicsContext3D*); 149 void removeChildContext(GraphicsContext3D*);
150 150
151 // Return true if the compositor context has an error.
152 bool isCompositorContextLost();
153
151 #ifndef NDEBUG 154 #ifndef NDEBUG
152 static bool s_inPaintLayerContents; 155 static bool s_inPaintLayerContents;
153 #endif 156 #endif
154 private: 157 private:
155 typedef Vector<RefPtr<CCLayerImpl> > LayerList; 158 typedef Vector<RefPtr<CCLayerImpl> > LayerList;
156 typedef HashMap<GraphicsContext3D*, int> ChildContextMap; 159 typedef HashMap<GraphicsContext3D*, int> ChildContextMap;
157 160
158 // FIXME: This needs to be moved to the CCViewImpl when that class exists. 161 // FIXME: This needs to be moved to the CCViewImpl when that class exists.
159 RefPtr<CCLayerImpl> m_rootCCLayerImpl; 162 RefPtr<CCLayerImpl> m_rootCCLayerImpl;
160 163
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 OwnPtr<TextureManager> m_textureManager; 234 OwnPtr<TextureManager> m_textureManager;
232 235
233 OwnPtr<CCHeadsUpDisplay> m_headsUpDisplay; 236 OwnPtr<CCHeadsUpDisplay> m_headsUpDisplay;
234 237
235 RefPtr<GraphicsContext3D> m_context; 238 RefPtr<GraphicsContext3D> m_context;
236 #if USE(SKIA) 239 #if USE(SKIA)
237 OwnPtr<GrContext> m_skiaContext; 240 OwnPtr<GrContext> m_skiaContext;
238 #endif 241 #endif
239 242
240 ChildContextMap m_childContexts; 243 ChildContextMap m_childContexts;
241 // If true, the child contexts were copied to the compositor texture targets
242 // and the compositor will need to wait on the proper latches before using
243 // the target textures. If false, the compositor is reusing the textures
244 // from last frame.
245 bool m_childContextsWereCopied;
246 244
247 bool m_contextSupportsLatch; 245 bool m_contextSupportsLatch;
248 bool m_contextSupportsMapSub; 246 bool m_contextSupportsMapSub;
249 247
250 bool m_animating; 248 bool m_animating;
251 249
252 RenderSurfaceChromium* m_defaultRenderSurface; 250 RenderSurfaceChromium* m_defaultRenderSurface;
253 251
254 CCLayerSorter m_layerSorter; 252 CCLayerSorter m_layerSorter;
255 }; 253 };
256 254
257 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL 255 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL
258 // call made by the compositor. Useful for debugging rendering issues but 256 // call made by the compositor. Useful for debugging rendering issues but
259 // will significantly degrade performance. 257 // will significantly degrade performance.
260 #define DEBUG_GL_CALLS 0 258 #define DEBUG_GL_CALLS 0
261 259
262 #if DEBUG_GL_CALLS && !defined ( NDEBUG ) 260 #if DEBUG_GL_CALLS && !defined ( NDEBUG )
263 #define GLC(context, x) { (x), LayerRendererChromium::debugGLCall(context, #x, _ _FILE__, __LINE__); } 261 #define GLC(context, x) { (x), LayerRendererChromium::debugGLCall(context, #x, _ _FILE__, __LINE__); }
264 #else 262 #else
265 #define GLC(context, x) (x) 263 #define GLC(context, x) (x)
266 #endif 264 #endif
267 265
268 266
269 } 267 }
270 268
271 #endif // USE(ACCELERATED_COMPOSITING) 269 #endif // USE(ACCELERATED_COMPOSITING)
272 270
273 #endif 271 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698