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

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

Issue 22870016: Update the nine patch layer to use UI resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ccameron's fix for exisiting nine-patch uses Created 7 years, 3 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 CC_TREES_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class LayerTreeHostImplTimeSourceAdapter; 43 class LayerTreeHostImplTimeSourceAdapter;
44 class LayerTreeImpl; 44 class LayerTreeImpl;
45 class PageScaleAnimation; 45 class PageScaleAnimation;
46 class PaintTimeCounter; 46 class PaintTimeCounter;
47 class MemoryHistory; 47 class MemoryHistory;
48 class RenderingStatsInstrumentation; 48 class RenderingStatsInstrumentation;
49 class RenderPassDrawQuad; 49 class RenderPassDrawQuad;
50 class TextureMailboxDeleter; 50 class TextureMailboxDeleter;
51 class TopControlsManager; 51 class TopControlsManager;
52 class UIResourceBitmap; 52 class UIResourceBitmap;
53 class UIResourceRequest;
53 struct RendererCapabilities; 54 struct RendererCapabilities;
54 struct UIResourceRequest;
55 55
56 // LayerTreeHost->Proxy callback interface. 56 // LayerTreeHost->Proxy callback interface.
57 class LayerTreeHostImplClient { 57 class LayerTreeHostImplClient {
58 public: 58 public:
59 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 59 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
60 virtual void OnSwapBuffersCompleteOnImplThread() = 0; 60 virtual void OnSwapBuffersCompleteOnImplThread() = 0;
61 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0; 61 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0;
62 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 62 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
63 virtual void NotifyReadyToActivate() = 0; 63 virtual void NotifyReadyToActivate() = 0;
64 virtual void SetNeedsRedrawOnImplThread() = 0; 64 virtual void SetNeedsRedrawOnImplThread() = 0;
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 base::Time CurrentFrameTime(); 391 base::Time CurrentFrameTime();
392 392
393 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; 393 virtual base::TimeTicks CurrentPhysicalTimeTicks() const;
394 394
395 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } 395 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); }
396 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; 396 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const;
397 scoped_ptr<base::Value> ActivationStateAsValue() const; 397 scoped_ptr<base::Value> ActivationStateAsValue() const;
398 398
399 bool page_scale_animation_active() const { return !!page_scale_animation_; } 399 bool page_scale_animation_active() const { return !!page_scale_animation_; }
400 400
401 void CreateUIResource(UIResourceId uid, 401 virtual void CreateUIResource(UIResourceId uid,
402 scoped_refptr<UIResourceBitmap> bitmap); 402 const UIResourceBitmap& bitmap);
403 // Deletes a UI resource. May safely be called more than once. 403 // Deletes a UI resource. May safely be called more than once.
404 void DeleteUIResource(UIResourceId uid); 404 virtual void DeleteUIResource(UIResourceId uid);
405 void EvictAllUIResources(); 405 void EvictAllUIResources();
406 bool EvictedUIResourcesExist() const; 406 bool EvictedUIResourcesExist() const;
407 407
408 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; 408 virtual ResourceProvider::ResourceId ResourceIdForUIResource(
409 UIResourceId uid) const;
409 410
410 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); } 411 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); }
411 412
412 protected: 413 protected:
413 LayerTreeHostImpl( 414 LayerTreeHostImpl(
414 const LayerTreeSettings& settings, 415 const LayerTreeSettings& settings,
415 LayerTreeHostImplClient* client, 416 LayerTreeHostImplClient* client,
416 Proxy* proxy, 417 Proxy* proxy,
417 RenderingStatsInstrumentation* rendering_stats_instrumentation); 418 RenderingStatsInstrumentation* rendering_stats_instrumentation);
418 419
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 608
608 // Optional callback to notify of new tree activations. 609 // Optional callback to notify of new tree activations.
609 base::Closure tree_activation_callback_; 610 base::Closure tree_activation_callback_;
610 611
611 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 612 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
612 }; 613 };
613 614
614 } // namespace cc 615 } // namespace cc
615 616
616 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 617 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698