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

Side by Side Diff: chrome/browser/android/compositor/scene_layer/static_tab_scene_layer.h

Issue 2566753004: Simplify content_layer attachment and viewporting logic. (Closed)
Patch Set: Code review Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_H_ 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 22 matching lines...) Expand all
33 StaticTabSceneLayer(JNIEnv* env, jobject jobj); 33 StaticTabSceneLayer(JNIEnv* env, jobject jobj);
34 ~StaticTabSceneLayer() override; 34 ~StaticTabSceneLayer() override;
35 35
36 bool ShouldShowBackground() override; 36 bool ShouldShowBackground() override;
37 SkColor GetBackgroundColor() override; 37 SkColor GetBackgroundColor() override;
38 38
39 // Update StaticTabSceneLayer with the new parameters. 39 // Update StaticTabSceneLayer with the new parameters.
40 void UpdateTabLayer( 40 void UpdateTabLayer(
41 JNIEnv* env, 41 JNIEnv* env,
42 const base::android::JavaParamRef<jobject>& jobj, 42 const base::android::JavaParamRef<jobject>& jobj,
43 jfloat content_viewport_x,
44 jfloat content_viewport_y,
45 jfloat content_viewport_width,
46 jfloat content_viewport_height,
47 const base::android::JavaParamRef<jobject>& jtab_content_manager, 43 const base::android::JavaParamRef<jobject>& jtab_content_manager,
48 jint id, 44 jint id,
49 jint toolbar_resource_id, 45 jint toolbar_resource_id,
50 jboolean can_use_live_layer, 46 jboolean can_use_live_layer,
51 jint default_background_color, 47 jint default_background_color,
52 jfloat x, 48 jfloat x,
53 jfloat y, 49 jfloat y,
54 jfloat width,
55 jfloat height,
56 jfloat content_offset_y,
57 jfloat static_to_view_blend, 50 jfloat static_to_view_blend,
58 jfloat saturation, 51 jfloat saturation,
59 jfloat brightness); 52 jfloat brightness);
60 53
61 private: 54 private:
62 scoped_refptr<android::ContentLayer> content_layer_; 55 scoped_refptr<android::ContentLayer> content_layer_;
63 scoped_refptr<cc::Layer> content_scene_layer_; 56 scoped_refptr<cc::Layer> content_scene_layer_;
64 57
65 int last_set_tab_id_; 58 int last_set_tab_id_;
66 int background_color_; 59 int background_color_;
67 float brightness_; 60 float brightness_;
68 61
69 DISALLOW_COPY_AND_ASSIGN(StaticTabSceneLayer); 62 DISALLOW_COPY_AND_ASSIGN(StaticTabSceneLayer);
70 }; 63 };
71 64
72 bool RegisterStaticTabSceneLayer(JNIEnv* env); 65 bool RegisterStaticTabSceneLayer(JNIEnv* env);
73 66
74 } // namespace android 67 } // namespace android
75 68
76 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_ H_ 69 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698