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

Unified Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 82553015: Switch the android overscroll glow to use UIResources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor naming changes Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/compositor_impl_android.h
diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h
index a662b1de72ec93b88217d62ca66b685c3277dc4f..90b52b4949610994a5cb951190272bdbda55d533 100644
--- a/content/browser/renderer_host/compositor_impl_android.h
+++ b/content/browser/renderer_host/compositor_impl_android.h
@@ -60,6 +60,8 @@ class CONTENT_EXPORT CompositorImpl
virtual cc::UIResourceId GenerateUIResource(
const cc::UIResourceBitmap& bitmap) OVERRIDE;
virtual void DeleteUIResource(cc::UIResourceId resource_id) OVERRIDE;
+ virtual gfx::Size GetUIResourceSize(cc::UIResourceId id) const OVERRIDE;
+
virtual blink::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE;
virtual blink::WebGLId GenerateCompressedTexture(
gfx::Size& size, int data_size, void* data) OVERRIDE;
@@ -96,11 +98,20 @@ class CONTENT_EXPORT CompositorImpl
// ImageTransportFactoryAndroidObserver implementation.
virtual void OnLostResources() OVERRIDE;
+ virtual cc::UIResourceId GetOverscrollEdgeId() const OVERRIDE {
+ return overscroll_edge_id_;
+ }
+ virtual cc::UIResourceId GetOverscrollGlowId() const OVERRIDE {
+ return overscroll_glow_id_;
+ }
+
private:
blink::WebGLId BuildBasicTexture();
blink::WGC3Denum GetGLFormatForBitmap(gfx::JavaBitmap& bitmap);
blink::WGC3Denum GetGLTypeForBitmap(gfx::JavaBitmap& bitmap);
+ void LoadOverscrollResources();
+
scoped_refptr<cc::Layer> root_layer_;
scoped_ptr<cc::LayerTreeHost> host_;
@@ -120,6 +131,11 @@ class CONTENT_EXPORT CompositorImpl
gfx::NativeWindow root_window_;
+ scoped_ptr<cc::UIResourceBitmap> overscroll_edge_bitmap_;
+ scoped_ptr<cc::UIResourceBitmap> overscroll_glow_bitmap_;
+ cc::UIResourceId overscroll_edge_id_;
+ cc::UIResourceId overscroll_glow_id_;
+
DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
};

Powered by Google App Engine
This is Rietveld 408576698