Loading libs/hwui/RenderNode.cpp +16 −10 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 { Loading Loading @@ -274,9 +273,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; } Loading libs/hwui/renderthread/CanvasContext.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -266,11 +266,11 @@ void CanvasContext::draw() { Frame frame = mEglManager.beginFrame(mEglSurface); if (frame.width() != lastFrameWidth || frame.height() != lastFrameHeight) { if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) { // can't rely on prior content of window if viewport size changes dirty.setEmpty(); lastFrameWidth = frame.width(); lastFrameHeight = frame.height(); mLastFrameWidth = frame.width(); mLastFrameHeight = frame.height(); } else if (mHaveNewSurface || frame.bufferAge() == 0) { // New surface needs a full draw dirty.setEmpty(); Loading libs/hwui/renderthread/CanvasContext.h +2 −2 Original line number Diff line number Diff line Loading @@ -141,8 +141,8 @@ private: void freePrefetechedLayers(); int lastFrameWidth = 0; int lastFrameHeight = 0; EGLint mLastFrameWidth = 0; EGLint mLastFrameHeight = 0; RenderThread& mRenderThread; EglManager& mEglManager; Loading Loading
libs/hwui/RenderNode.cpp +16 −10 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 { Loading Loading @@ -274,9 +273,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; } Loading
libs/hwui/renderthread/CanvasContext.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -266,11 +266,11 @@ void CanvasContext::draw() { Frame frame = mEglManager.beginFrame(mEglSurface); if (frame.width() != lastFrameWidth || frame.height() != lastFrameHeight) { if (frame.width() != mLastFrameWidth || frame.height() != mLastFrameHeight) { // can't rely on prior content of window if viewport size changes dirty.setEmpty(); lastFrameWidth = frame.width(); lastFrameHeight = frame.height(); mLastFrameWidth = frame.width(); mLastFrameHeight = frame.height(); } else if (mHaveNewSurface || frame.bufferAge() == 0) { // New surface needs a full draw dirty.setEmpty(); Loading
libs/hwui/renderthread/CanvasContext.h +2 −2 Original line number Diff line number Diff line Loading @@ -141,8 +141,8 @@ private: void freePrefetechedLayers(); int lastFrameWidth = 0; int lastFrameHeight = 0; EGLint mLastFrameWidth = 0; EGLint mLastFrameHeight = 0; RenderThread& mRenderThread; EglManager& mEglManager; Loading