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

Side by Side Diff: cc/occlusion_tracker.cc

Issue 11365025: Make cc a component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/occlusion_tracker.h ('k') | cc/prioritized_texture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "config.h" 5 #include "config.h"
6 6
7 #include "cc/occlusion_tracker.h" 7 #include "cc/occlusion_tracker.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 template<typename LayerType, typename RenderSurfaceType> 22 template<typename LayerType, typename RenderSurfaceType>
23 OcclusionTrackerBase<LayerType, RenderSurfaceType>::OcclusionTrackerBase(gfx::Re ct rootTargetRect, bool recordMetricsForFrame) 23 OcclusionTrackerBase<LayerType, RenderSurfaceType>::OcclusionTrackerBase(gfx::Re ct rootTargetRect, bool recordMetricsForFrame)
24 : m_rootTargetRect(rootTargetRect) 24 : m_rootTargetRect(rootTargetRect)
25 , m_overdrawMetrics(OverdrawMetrics::create(recordMetricsForFrame)) 25 , m_overdrawMetrics(OverdrawMetrics::create(recordMetricsForFrame))
26 , m_occludingScreenSpaceRects(0) 26 , m_occludingScreenSpaceRects(0)
27 { 27 {
28 } 28 }
29 29
30 template<typename LayerType, typename RenderSurfaceType> 30 template<typename LayerType, typename RenderSurfaceType>
31 OcclusionTrackerBase<LayerType, RenderSurfaceType>::~OcclusionTrackerBase()
32 {
33 }
34
35 template<typename LayerType, typename RenderSurfaceType>
31 void OcclusionTrackerBase<LayerType, RenderSurfaceType>::enterLayer(const LayerI teratorPosition<LayerType>& layerIterator) 36 void OcclusionTrackerBase<LayerType, RenderSurfaceType>::enterLayer(const LayerI teratorPosition<LayerType>& layerIterator)
32 { 37 {
33 LayerType* renderTarget = layerIterator.targetRenderSurfaceLayer; 38 LayerType* renderTarget = layerIterator.targetRenderSurfaceLayer;
34 39
35 if (layerIterator.representsItself) 40 if (layerIterator.representsItself)
36 enterRenderTarget(renderTarget); 41 enterRenderTarget(renderTarget);
37 else if (layerIterator.representsTargetRenderSurface) 42 else if (layerIterator.representsTargetRenderSurface)
38 finishedRenderTarget(renderTarget); 43 finishedRenderTarget(renderTarget);
39 } 44 }
40 45
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 455 }
451 456
452 template<typename LayerType, typename RenderSurfaceType> 457 template<typename LayerType, typename RenderSurfaceType>
453 gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::layerClipRectInTar get(const LayerType* layer) const 458 gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::layerClipRectInTar get(const LayerType* layer) const
454 { 459 {
455 // FIXME: we could remove this helper function, but unit tests currently ove rride this 460 // FIXME: we could remove this helper function, but unit tests currently ove rride this
456 // function, and they need to be verified/adjusted before this can be removed. 461 // function, and they need to be verified/adjusted before this can be removed.
457 return layer->drawableContentRect(); 462 return layer->drawableContentRect();
458 } 463 }
459 464
460 // Declare the possible functions here for the linker. 465 // Instantiate (and export) templates here for the linker.
461 template OcclusionTrackerBase<Layer, RenderSurface>::OcclusionTrackerBase(gfx::R ect rootTargetRect, bool recordMetricsForFrame); 466 template class CC_EXPORT OcclusionTrackerBase<Layer, RenderSurface>;
462 template void OcclusionTrackerBase<Layer, RenderSurface>::enterLayer(const Layer IteratorPosition<Layer>&); 467 template class CC_EXPORT OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>;
463 template void OcclusionTrackerBase<Layer, RenderSurface>::leaveLayer(const Layer IteratorPosition<Layer>&);
464 template void OcclusionTrackerBase<Layer, RenderSurface>::enterRenderTarget(cons t Layer* newTarget);
465 template void OcclusionTrackerBase<Layer, RenderSurface>::finishedRenderTarget(c onst Layer* finishedTarget);
466 template void OcclusionTrackerBase<Layer, RenderSurface>::leaveToRenderTarget(co nst Layer* newTarget);
467 template void OcclusionTrackerBase<Layer, RenderSurface>::markOccludedBehindLaye r(const Layer*);
468 template bool OcclusionTrackerBase<Layer, RenderSurface>::occluded(const Layer*, const gfx::Rect& contentRect, const WebKit::WebTransformationMatrix& drawTransf orm, bool implDrawTransformIsUnknown, const gfx::Rect& clippedRectInTarget, bool * hasOcclusionFromOutsideTargetSurface) const;
469 template gfx::Rect OcclusionTrackerBase<Layer, RenderSurface>::unoccludedContent Rect(const Layer*, const gfx::Rect& contentRect, const WebKit::WebTransformation Matrix& drawTransform, bool implDrawTransformIsUnknown, const gfx::Rect& clipped RectInTarget, bool* hasOcclusionFromOutsideTargetSurface) const;
470 template gfx::Rect OcclusionTrackerBase<Layer, RenderSurface>::unoccludedContrib utingSurfaceContentRect(const Layer*, bool forReplica, const gfx::Rect& contentR ect, bool* hasOcclusionFromOutsideTargetSurface) const;
471 template gfx::Rect OcclusionTrackerBase<Layer, RenderSurface>::layerClipRectInTa rget(const Layer*) const;
472
473 template OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::OcclusionTrackerBas e(gfx::Rect rootTargetRect, bool recordMetricsForFrame);
474 template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::enterLayer(con st LayerIteratorPosition<LayerImpl>&);
475 template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::leaveLayer(con st LayerIteratorPosition<LayerImpl>&);
476 template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::enterRenderTar get(const LayerImpl* newTarget);
477 template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::finishedRender Target(const LayerImpl* finishedTarget);
478 template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::leaveToRenderT arget(const LayerImpl* newTarget);
479 template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::markOccludedBe hindLayer(const LayerImpl*);
480 template bool OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::occluded(const LayerImpl*, const gfx::Rect& contentRect, const WebKit::WebTransformationMatrix & drawTransform, bool implDrawTransformIsUnknown, const gfx::Rect& clippedRectIn Target, bool* hasOcclusionFromOutsideTargetSurface) const;
481 template gfx::Rect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::unocclude dContentRect(const LayerImpl*, const gfx::Rect& contentRect, const WebKit::WebTr ansformationMatrix& drawTransform, bool implDrawTransformIsUnknown, const gfx::R ect& clippedRectInTarget, bool* hasOcclusionFromOutsideTargetSurface) const;
482 template gfx::Rect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::unocclude dContributingSurfaceContentRect(const LayerImpl*, bool forReplica, const gfx::Re ct& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
483 template gfx::Rect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::layerClip RectInTarget(const LayerImpl*) const;
484
485 468
486 } // namespace cc 469 } // namespace cc
OLDNEW
« no previous file with comments | « cc/occlusion_tracker.h ('k') | cc/prioritized_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698