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

Side by Side Diff: cc/layers/layer_impl.h

Issue 2468023002: Don't free non-tile resources on GPU rasterization toggle (Closed)
Patch Set: fix unittest Created 4 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
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('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 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_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 void ResetChangeTracking(); 369 void ResetChangeTracking();
370 370
371 virtual SimpleEnclosedRegion VisibleOpaqueRegion() const; 371 virtual SimpleEnclosedRegion VisibleOpaqueRegion() const;
372 372
373 virtual void DidBecomeActive() {} 373 virtual void DidBecomeActive() {}
374 374
375 virtual void DidBeginTracing(); 375 virtual void DidBeginTracing();
376 376
377 // Release resources held by this layer. Called when the output surface 377 // Release resources held by this layer. Called when the output surface
378 // that rendered this layer was lost or a rendering mode switch has occured. 378 // that rendered this layer was lost.
379 virtual void ReleaseResources(); 379 virtual void ReleaseResources();
380 380
381 // Recreate resources that are required after they were released by a 381 // Release tile resources held by this layer. Called when a rendering mode
382 // ReleaseResources call. 382 // switch has occured and tiles are no longer valid.
383 virtual void RecreateResources(); 383 virtual void ReleaseTileResources();
384
385 // Recreate tile resources held by this layer after they were released by a
386 // ReleaseTileResources call.
387 virtual void RecreateTileResources();
384 388
385 virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); 389 virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
386 virtual bool IsSnapped(); 390 virtual bool IsSnapped();
387 virtual void PushPropertiesTo(LayerImpl* layer); 391 virtual void PushPropertiesTo(LayerImpl* layer);
388 392
389 virtual void GetAllPrioritizedTilesForTracing( 393 virtual void GetAllPrioritizedTilesForTracing(
390 std::vector<PrioritizedTile>* prioritized_tiles) const; 394 std::vector<PrioritizedTile>* prioritized_tiles) const;
391 virtual void AsValueInto(base::trace_event::TracedValue* dict) const; 395 virtual void AsValueInto(base::trace_event::TracedValue* dict) const;
392 396
393 virtual size_t GPUMemoryUsageInBytes() const; 397 virtual size_t GPUMemoryUsageInBytes() const;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 bool has_will_change_transform_hint_ : 1; 584 bool has_will_change_transform_hint_ : 1;
581 bool needs_push_properties_ : 1; 585 bool needs_push_properties_ : 1;
582 bool scrollbars_hidden_ : 1; 586 bool scrollbars_hidden_ : 1;
583 587
584 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 588 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
585 }; 589 };
586 590
587 } // namespace cc 591 } // namespace cc
588 592
589 #endif // CC_LAYERS_LAYER_IMPL_H_ 593 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698