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

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 151093005: cc: Update Main RendererCapabilities on DeferredInitialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Release Mailbox if UsingSharedMemoryResources changed in TextureLayer::Update Created 6 years, 10 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 | Annotate | Revision Log
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 CC_TREES_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 struct CC_EXPORT RendererCapabilities { 66 struct CC_EXPORT RendererCapabilities {
67 RendererCapabilities(ResourceFormat best_texture_format, 67 RendererCapabilities(ResourceFormat best_texture_format,
68 bool allow_partial_texture_updates, 68 bool allow_partial_texture_updates,
69 bool using_offscreen_context3d, 69 bool using_offscreen_context3d,
70 int max_texture_size, 70 int max_texture_size,
71 bool using_shared_memory_resources); 71 bool using_shared_memory_resources);
72 72
73 RendererCapabilities(); 73 RendererCapabilities();
74 ~RendererCapabilities(); 74 ~RendererCapabilities();
75 75
76 bool operator==(const RendererCapabilities& other) const;
77 bool operator!=(const RendererCapabilities& other) const;
78
76 // Duplicate any modification to this list to RendererCapabilitiesImpl. 79 // Duplicate any modification to this list to RendererCapabilitiesImpl.
77 ResourceFormat best_texture_format; 80 ResourceFormat best_texture_format;
78 bool allow_partial_texture_updates; 81 bool allow_partial_texture_updates;
79 bool using_offscreen_context3d; 82 bool using_offscreen_context3d;
80 int max_texture_size; 83 int max_texture_size;
81 bool using_shared_memory_resources; 84 bool using_shared_memory_resources;
82 }; 85 };
83 86
84 class CC_EXPORT LayerTreeHost { 87 class CC_EXPORT LayerTreeHost {
85 public: 88 public:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 LayerTreeHostImplClient* client); 125 LayerTreeHostImplClient* client);
123 void DidLoseOutputSurface(); 126 void DidLoseOutputSurface();
124 bool output_surface_lost() const { return output_surface_lost_; } 127 bool output_surface_lost() const { return output_surface_lost_; }
125 enum CreateResult { 128 enum CreateResult {
126 CreateSucceeded, 129 CreateSucceeded,
127 CreateFailedButTryAgain, 130 CreateFailedButTryAgain,
128 CreateFailedAndGaveUp, 131 CreateFailedAndGaveUp,
129 }; 132 };
130 virtual CreateResult OnCreateAndInitializeOutputSurfaceAttempted( 133 virtual CreateResult OnCreateAndInitializeOutputSurfaceAttempted(
131 bool success); 134 bool success);
135 void RendererCapabilitiesChanged();
132 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } 136 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); }
133 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } 137 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); }
134 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); 138 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider);
135 virtual void AcquireLayerTextures(); 139 virtual void AcquireLayerTextures();
136 // Returns false if we should abort this frame due to initialization failure. 140 // Returns false if we should abort this frame due to initialization failure.
137 bool InitializeOutputSurfaceIfNeeded(); 141 bool InitializeOutputSurfaceIfNeeded();
138 bool UpdateLayers(ResourceUpdateQueue* queue); 142 bool UpdateLayers(ResourceUpdateQueue* queue);
139 143
140 LayerTreeHostClient* client() { return client_; } 144 LayerTreeHostClient* client() { return client_; }
141 const base::WeakPtr<InputHandler>& GetInputHandler() { 145 const base::WeakPtr<InputHandler>& GetInputHandler() {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 464
461 ScopedPtrVector<SwapPromise> swap_promise_list_; 465 ScopedPtrVector<SwapPromise> swap_promise_list_;
462 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 466 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
463 467
464 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 468 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
465 }; 469 };
466 470
467 } // namespace cc 471 } // namespace cc
468 472
469 #endif // CC_TREES_LAYER_TREE_HOST_H_ 473 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698