summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-10-26 15:49:47 -0700
committerJohn Reck <jreck@google.com>2015-10-27 07:54:17 -0700
commit77c40109cf25d29f85ee6c13aeb96e22e55f33ab (patch)
tree479c941dfbb94c36fb73dc86e03da8412636fcec /libs/hwui/RenderNode.cpp
parent5918519f972b4eedfc0e402b96cf8a288446deed (diff)
Cleanups
Change-Id: I10001711afb2530c5dc19aebf2d055ae41f58c6a
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r--libs/hwui/RenderNode.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 351fbaa86a2a..ea872a133ddb 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -16,13 +16,6 @@
#include "RenderNode.h"
-#include <algorithm>
-#include <string>
-
-#include <SkCanvas.h>
-#include <algorithm>
-
-
#include "DamageAccumulator.h"
#include "Debug.h"
#if HWUI_NEW_OPS
@@ -39,6 +32,12 @@
#include "protos/hwui.pb.h"
#include "protos/ProtoHelpers.h"
+#include <SkCanvas.h>
+
+#include <algorithm>
+#include <sstream>
+#include <string>
+
namespace android {
namespace uirenderer {
@@ -269,9 +268,16 @@ void RenderNode::pushLayerUpdate(TreeInfo& info) {
if (!mLayer) {
Caches::getInstance().dumpMemoryUsage();
if (info.errorHandler) {
- std::string msg = "Unable to create layer for ";
- msg += getName();
- info.errorHandler->onError(msg);
+ std::ostringstream err;
+ err << "Unable to create layer for " << getName();
+ const int maxTextureSize = Caches::getInstance().maxTextureSize;
+ if (getWidth() > maxTextureSize || getHeight() > maxTextureSize) {
+ err << ", size " << getWidth() << "x" << getHeight()
+ << " exceeds max size " << maxTextureSize;
+ } else {
+ err << ", see logcat for more info";
+ }
+ info.errorHandler->onError(err.str());
}
return;
}