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

Side by Side Diff: cc/layer_impl.h

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 2 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 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CCLayerImpl_h 5 #ifndef CCLayerImpl_h
6 #define CCLayerImpl_h 6 #define CCLayerImpl_h
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/dcheck.h"
9 #include "cc/scoped_ptr_vector.h" 10 #include "cc/scoped_ptr_vector.h"
10 #include "CCInputHandler.h" 11 #include "CCInputHandler.h"
11 #include "CCLayerAnimationController.h" 12 #include "CCLayerAnimationController.h"
12 #include "CCRenderPass.h" 13 #include "CCRenderPass.h"
13 #include "CCRenderSurface.h" 14 #include "CCRenderSurface.h"
14 #include "CCResourceProvider.h" 15 #include "CCResourceProvider.h"
15 #include "CCSharedQuadState.h" 16 #include "CCSharedQuadState.h"
16 #include "FloatRect.h" 17 #include "FloatRect.h"
17 #include "IntRect.h" 18 #include "IntRect.h"
18 #include "Region.h" 19 #include "Region.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 CCRenderSurface* renderSurface() const { return m_renderSurface.get(); } 155 CCRenderSurface* renderSurface() const { return m_renderSurface.get(); }
155 void createRenderSurface(); 156 void createRenderSurface();
156 void clearRenderSurface() { m_renderSurface.clear(); } 157 void clearRenderSurface() { m_renderSurface.clear(); }
157 158
158 float drawOpacity() const { return m_drawOpacity; } 159 float drawOpacity() const { return m_drawOpacity; }
159 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } 160 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; }
160 161
161 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } 162 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; }
162 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; } 163 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; }
163 164
164 CCLayerImpl* renderTarget() const { ASSERT(!m_renderTarget || m_renderTarget ->renderSurface()); return m_renderTarget; } 165 CCLayerImpl* renderTarget() const { CC_DCHECK(!m_renderTarget || m_renderTar get->renderSurface()); return m_renderTarget; }
165 void setRenderTarget(CCLayerImpl* target) { m_renderTarget = target; } 166 void setRenderTarget(CCLayerImpl* target) { m_renderTarget = target; }
166 167
167 void setBounds(const IntSize&); 168 void setBounds(const IntSize&);
168 const IntSize& bounds() const { return m_bounds; } 169 const IntSize& bounds() const { return m_bounds; }
169 170
170 const IntSize& contentBounds() const { return m_contentBounds; } 171 const IntSize& contentBounds() const { return m_contentBounds; }
171 void setContentBounds(const IntSize&); 172 void setContentBounds(const IntSize&);
172 173
173 const IntPoint& scrollPosition() const { return m_scrollPosition; } 174 const IntPoint& scrollPosition() const { return m_scrollPosition; }
174 void setScrollPosition(const IntPoint&); 175 void setScrollPosition(const IntPoint&);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 std::string m_debugName; 362 std::string m_debugName;
362 363
363 WebKit::WebFilterOperations m_filters; 364 WebKit::WebFilterOperations m_filters;
364 WebKit::WebFilterOperations m_backgroundFilters; 365 WebKit::WebFilterOperations m_backgroundFilters;
365 366
366 WebKit::WebTransformationMatrix m_drawTransform; 367 WebKit::WebTransformationMatrix m_drawTransform;
367 WebKit::WebTransformationMatrix m_screenSpaceTransform; 368 WebKit::WebTransformationMatrix m_screenSpaceTransform;
368 bool m_drawTransformIsAnimating; 369 bool m_drawTransformIsAnimating;
369 bool m_screenSpaceTransformIsAnimating; 370 bool m_screenSpaceTransformIsAnimating;
370 371
371 #ifndef NDEBUG 372 #if CC_DCHECK_ENABLED
372 bool m_betweenWillDrawAndDidDraw; 373 bool m_betweenWillDrawAndDidDraw;
373 #endif 374 #endif
374 375
375 // Render surface associated with this layer. The layer and its descendants 376 // Render surface associated with this layer. The layer and its descendants
376 // will render to this surface. 377 // will render to this surface.
377 OwnPtr<CCRenderSurface> m_renderSurface; 378 OwnPtr<CCRenderSurface> m_renderSurface;
378 379
379 // Hierarchical bounding rect containing the layer and its descendants. 380 // Hierarchical bounding rect containing the layer and its descendants.
380 // Uses target surface's space. 381 // Uses target surface's space.
381 IntRect m_drawableContentRect; 382 IntRect m_drawableContentRect;
382 383
383 // Rect indicating what was repainted/updated during update. 384 // Rect indicating what was repainted/updated during update.
384 // Note that plugin layers bypass this and leave it empty. 385 // Note that plugin layers bypass this and leave it empty.
385 // Uses layer's content space. 386 // Uses layer's content space.
386 FloatRect m_updateRect; 387 FloatRect m_updateRect;
387 388
388 // Manages animations for this layer. 389 // Manages animations for this layer.
389 scoped_ptr<CCLayerAnimationController> m_layerAnimationController; 390 scoped_ptr<CCLayerAnimationController> m_layerAnimationController;
390 391
391 // Manages scrollbars for this layer 392 // Manages scrollbars for this layer
392 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; 393 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController;
393 }; 394 };
394 395
395 void sortLayers(std::vector<CCLayerImpl*>::iterator first, std::vector<CCLayerIm pl*>::iterator end, CCLayerSorter*); 396 void sortLayers(std::vector<CCLayerImpl*>::iterator first, std::vector<CCLayerIm pl*>::iterator end, CCLayerSorter*);
396 397
397 } 398 }
398 399
399 #endif // CCLayerImpl_h 400 #endif // CCLayerImpl_h
OLDNEW
« no previous file with comments | « cc/layer_animation_controller.cc ('k') | cc/layer_impl.cc » ('j') | cc/yuv_video_draw_quad.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698