Bug 739679 - Part 7: Enable tiling. r=pcwalton a=blocking-fennec
authorBenoit Girard <b56girard@gmail.com>
Mon, 23 Apr 2012 23:22:25 -0400
changeset 92206 82cb595c2a03e80fe17aa0f65905c25c4086a253
parent 92205 58736fb3b00105491a603ef24125d03aca182175
child 92207 f410f3436cdbf5e7c6f62209d41beb61bb319232
child 92279 0fab1a28d7c397eabde85243f66b5cb725ca42ef
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerspcwalton, blocking-fennec
bugs739679
milestone14.0a1
Bug 739679 - Part 7: Enable tiling. r=pcwalton a=blocking-fennec
gfx/layers/TiledLayerBuffer.h
gfx/layers/basic/BasicLayers.cpp
--- a/gfx/layers/TiledLayerBuffer.h
+++ b/gfx/layers/TiledLayerBuffer.h
@@ -3,17 +3,21 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GFX_TILEDLAYERBUFFER_H
 #define GFX_TILEDLAYERBUFFER_H
 
 #define TILEDLAYERBUFFER_TILE_SIZE 256
 
 // Debug defines
-//#define FORCE_BASICTILEDTHEBESLAYER
+#ifdef MOZ_JAVA_COMPOSITOR
+  // This needs to go away as we enabled tiled
+  // layers everywhere.
+  #define FORCE_BASICTILEDTHEBESLAYER
+#endif
 //#define GFX_TILEDLAYER_DEBUG_OVERLAY
 //#define GFX_TILEDLAYER_PREF_WARNINGS
 
 #include "nsRect.h"
 #include "nsRegion.h"
 #include "nsTArray.h"
 
 namespace mozilla {
--- a/gfx/layers/basic/BasicLayers.cpp
+++ b/gfx/layers/basic/BasicLayers.cpp
@@ -3123,17 +3123,17 @@ MaybeCreateShadowFor(BasicShadowableLaye
   MaybeCreateShadowFor(layer, this,                                     \
                        &ShadowLayerForwarder::Created ## _type ## Layer)
 
 already_AddRefed<ThebesLayer>
 BasicShadowLayerManager::CreateThebesLayer()
 {
   NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
 #ifdef FORCE_BASICTILEDTHEBESLAYER
-  if (HasShadowManager()) {
+  if (HasShadowManager() && GetParentBackendType() == LayerManager::LAYERS_OPENGL) {
     // BasicTiledThebesLayer doesn't support main
     // thread compositing so only return this layer
     // type if we have a shadow manager.
     nsRefPtr<BasicTiledThebesLayer> layer =
       new BasicTiledThebesLayer(this);
     MAYBE_CREATE_SHADOW(Thebes);
     return layer.forget();
   } else