diff options
author | 2016-06-30 07:54:14 -0700 | |
---|---|---|
committer | 2016-06-30 07:54:14 -0700 | |
commit | 9a7acdc213506aeb451f2c05143d342e32f20c69 (patch) | |
tree | 3f5d05f38fecd250c4ee578d49a4daa301ec8615 /tools | |
parent | d922c33a8e804f9d32aa9aa399ca52e50ec9f2d2 (diff) |
debugger: Allow for larger images.
Also differentiate between max dimensions and default dimensions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2113693002
Review-Url: https://codereview.chromium.org/2113693002
Diffstat (limited to 'tools')
-rw-r--r-- | tools/skiaserve/Request.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp index f2f10acad1..2af707a57d 100644 --- a/tools/skiaserve/Request.cpp +++ b/tools/skiaserve/Request.cpp @@ -16,6 +16,8 @@ using namespace sk_gpu_test; static int kDefaultWidth = 1920; static int kDefaultHeight = 1080; +static int kMaxWidth = 8192; +static int kMaxHeight = 8192; Request::Request(SkString rootUrl) @@ -126,7 +128,7 @@ GrContext* Request::getContext() { if (!result) { result = fContextFactory->get(GrContextFactory::kMESA_ContextType, GrContextFactory::kNone_ContextOptions); - } + } return result; #else return nullptr; @@ -148,10 +150,10 @@ SkIRect Request::getBounds() { bounds = SkIRect::MakeWH(kDefaultWidth, kDefaultHeight); } - // We clip to kDefaultWidth / kDefaultHeight for performance reasons + // We clip to kMaxWidth / kMaxHeight for performance reasons. // TODO make this configurable - bounds = SkIRect::MakeWH(SkTMin(bounds.width(), kDefaultWidth), - SkTMin(bounds.height(), kDefaultHeight)); + bounds = SkIRect::MakeWH(SkTMin(bounds.width(), kMaxWidth), + SkTMin(bounds.height(), kMaxHeight)); return bounds; } |