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

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: updated dchecks in ui_resource_bitmap 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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 30 matching lines...) Expand all
41 class LayerImpl; 41 class LayerImpl;
42 class LayerTreeHostImplTimeSourceAdapter; 42 class LayerTreeHostImplTimeSourceAdapter;
43 class LayerTreeImpl; 43 class LayerTreeImpl;
44 class PageScaleAnimation; 44 class PageScaleAnimation;
45 class PaintTimeCounter; 45 class PaintTimeCounter;
46 class MemoryHistory; 46 class MemoryHistory;
47 class RenderingStatsInstrumentation; 47 class RenderingStatsInstrumentation;
48 class RenderPassDrawQuad; 48 class RenderPassDrawQuad;
49 class TopControlsManager; 49 class TopControlsManager;
50 class UIResourceBitmap; 50 class UIResourceBitmap;
51 class UIResourceRequest;
51 struct RendererCapabilities; 52 struct RendererCapabilities;
52 struct UIResourceRequest;
53 53
54 // LayerTreeHost->Proxy callback interface. 54 // LayerTreeHost->Proxy callback interface.
55 class LayerTreeHostImplClient { 55 class LayerTreeHostImplClient {
56 public: 56 public:
57 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 57 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
58 virtual void OnSwapBuffersCompleteOnImplThread() = 0; 58 virtual void OnSwapBuffersCompleteOnImplThread() = 0;
59 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0; 59 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0;
60 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 60 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
61 virtual void NotifyReadyToActivate() = 0; 61 virtual void NotifyReadyToActivate() = 0;
62 virtual void SetNeedsRedrawOnImplThread() = 0; 62 virtual void SetNeedsRedrawOnImplThread() = 0;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 base::Time CurrentFrameTime(); 398 base::Time CurrentFrameTime();
399 399
400 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; 400 virtual base::TimeTicks CurrentPhysicalTimeTicks() const;
401 401
402 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } 402 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); }
403 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; 403 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const;
404 scoped_ptr<base::Value> ActivationStateAsValue() const; 404 scoped_ptr<base::Value> ActivationStateAsValue() const;
405 405
406 bool page_scale_animation_active() const { return !!page_scale_animation_; } 406 bool page_scale_animation_active() const { return !!page_scale_animation_; }
407 407
408 void CreateUIResource(UIResourceId uid, 408 virtual void CreateUIResource(UIResourceId uid,
409 scoped_refptr<UIResourceBitmap> bitmap); 409 const UIResourceBitmap& bitmap);
410 // Deletes a UI resource. May safely be called more than once. 410 // Deletes a UI resource. May safely be called more than once.
411 void DeleteUIResource(UIResourceId uid); 411 virtual void DeleteUIResource(UIResourceId uid);
412 void DeleteAllUIResources(); 412 void DeleteAllUIResources();
413 413
414 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; 414 virtual ResourceProvider::ResourceId ResourceIdForUIResource(
415 UIResourceId uid) const;
415 416
416 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); } 417 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); }
417 418
418 protected: 419 protected:
419 LayerTreeHostImpl( 420 LayerTreeHostImpl(
420 const LayerTreeSettings& settings, 421 const LayerTreeSettings& settings,
421 LayerTreeHostImplClient* client, 422 LayerTreeHostImplClient* client,
422 Proxy* proxy, 423 Proxy* proxy,
423 RenderingStatsInstrumentation* rendering_stats_instrumentation); 424 RenderingStatsInstrumentation* rendering_stats_instrumentation);
424 425
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 604
604 // Optional callback to notify of new tree activations. 605 // Optional callback to notify of new tree activations.
605 base::Closure tree_activation_callback_; 606 base::Closure tree_activation_callback_;
606 607
607 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 608 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
608 }; 609 };
609 610
610 } // namespace cc 611 } // namespace cc
611 612
612 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 613 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698