OLD | NEW |
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 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCLayerTreeHost.h" | 7 #include "CCLayerTreeHost.h" |
8 | 8 |
9 #include "CCFontAtlas.h" | 9 #include "CCFontAtlas.h" |
10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 using WebKit::WebTransformationMatrix; | 29 using WebKit::WebTransformationMatrix; |
30 | 30 |
31 namespace { | 31 namespace { |
32 static int numLayerTreeInstances; | 32 static int numLayerTreeInstances; |
33 } | 33 } |
34 | 34 |
35 namespace cc { | 35 namespace cc { |
36 | 36 |
37 bool CCLayerTreeHost::s_needsFilterContext = false; | 37 bool CCLayerTreeHost::s_needsFilterContext = false; |
38 | 38 |
| 39 CCLayerTreeSettings::CCLayerTreeSettings() |
| 40 : acceleratePainting(false) |
| 41 , showFPSCounter(false) |
| 42 , showPlatformLayerTree(false) |
| 43 , showPaintRects(false) |
| 44 , showPropertyChangedRects(false) |
| 45 , showSurfaceDamageRects(false) |
| 46 , showScreenSpaceRects(false) |
| 47 , showReplicaScreenSpaceRects(false) |
| 48 , showOccludingRects(false) |
| 49 , renderVSyncEnabled(true) |
| 50 , refreshRate(0) |
| 51 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) |
| 52 , defaultTileSize(IntSize(256, 256)) |
| 53 , maxUntiledLayerSize(IntSize(512, 512)) |
| 54 , minimumOcclusionTrackingSize(IntSize(160, 160)) |
| 55 { |
| 56 } |
| 57 |
| 58 CCLayerTreeSettings::~CCLayerTreeSettings() |
| 59 { |
| 60 } |
| 61 |
| 62 RendererCapabilities::RendererCapabilities() |
| 63 : bestTextureFormat(0) |
| 64 , contextHasCachedFrontBuffer(false) |
| 65 , usingPartialSwap(false) |
| 66 , usingAcceleratedPainting(false) |
| 67 , usingSetVisibility(false) |
| 68 , usingSwapCompleteCallback(false) |
| 69 , usingGpuMemoryManager(false) |
| 70 , usingDiscardFramebuffer(false) |
| 71 , usingEglImage(false) |
| 72 , maxTextureSize(0) |
| 73 { |
| 74 } |
| 75 |
| 76 RendererCapabilities::~RendererCapabilities() |
| 77 { |
| 78 } |
| 79 |
39 bool CCLayerTreeHost::anyLayerTreeHostInstanceExists() | 80 bool CCLayerTreeHost::anyLayerTreeHostInstanceExists() |
40 { | 81 { |
41 return numLayerTreeInstances > 0; | 82 return numLayerTreeInstances > 0; |
42 } | 83 } |
43 | 84 |
44 PassOwnPtr<CCLayerTreeHost> CCLayerTreeHost::create(CCLayerTreeHostClient* clien
t, const CCLayerTreeSettings& settings) | 85 PassOwnPtr<CCLayerTreeHost> CCLayerTreeHost::create(CCLayerTreeHostClient* clien
t, const CCLayerTreeSettings& settings) |
45 { | 86 { |
46 OwnPtr<CCLayerTreeHost> layerTreeHost = adoptPtr(new CCLayerTreeHost(client,
settings)); | 87 OwnPtr<CCLayerTreeHost> layerTreeHost = adoptPtr(new CCLayerTreeHost(client,
settings)); |
47 if (!layerTreeHost->initialize()) | 88 if (!layerTreeHost->initialize()) |
48 return nullptr; | 89 return nullptr; |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 else | 847 else |
807 layer->notifyAnimationFinished(wallClockTime); | 848 layer->notifyAnimationFinished(wallClockTime); |
808 } | 849 } |
809 } | 850 } |
810 | 851 |
811 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 852 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
812 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 853 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
813 } | 854 } |
814 | 855 |
815 } // namespace cc | 856 } // namespace cc |
OLD | NEW |