blob: 2eae9c29724433319cf7d9d105d997ea8f323e15 [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080017#include <stdlib.h>
18#include <stdio.h>
19#include <string.h>
20#include <math.h>
21
22#include <cutils/properties.h>
23
Mathias Agopian076b1cc2009-04-10 14:24:30 -070024#include <utils/RefBase.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080025#include <utils/Log.h>
26
Mathias Agopianc666cae2012-07-25 18:56:13 -070027#include <ui/DisplayInfo.h>
Mathias Agopian076b1cc2009-04-10 14:24:30 -070028#include <ui/PixelFormat.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080029
Mathias Agopiane3c697f2013-02-14 17:11:02 -080030#include <gui/Surface.h>
Jamie Gennis1a4d8832012-08-02 20:11:05 -070031
Mathias Agopian076b1cc2009-04-10 14:24:30 -070032#include <hardware/gralloc.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080033
Jesse Hall99c7dbb2013-03-14 14:29:29 -070034#include "DisplayHardware/DisplaySurface.h"
Mathias Agopian1b031492012-06-20 17:51:20 -070035#include "DisplayHardware/HWComposer.h"
Mathias Agopian875d8e12013-06-07 15:35:48 -070036#include "RenderEngine/RenderEngine.h"
Mathias Agopian1b031492012-06-20 17:51:20 -070037
Mathias Agopianda8d0a52012-09-04 15:05:38 -070038#include "clz.h"
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -070039#include "DisplayDevice.h"
Mathias Agopianc7d14e22011-08-01 16:32:21 -070040#include "SurfaceFlinger.h"
Mathias Agopian13127d82013-03-05 17:47:11 -080041#include "Layer.h"
Mathias Agopian1f7bec62010-06-25 18:02:21 -070042
Mathias Agopiana4912602012-07-12 14:25:33 -070043// ----------------------------------------------------------------------------
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080044using namespace android;
Mathias Agopiana4912602012-07-12 14:25:33 -070045// ----------------------------------------------------------------------------
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080046
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080047/*
48 * Initialize the display to the specified values.
49 *
50 */
51
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -070052DisplayDevice::DisplayDevice(
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080053 const sp<SurfaceFlinger>& flinger,
Jamie Gennisdd3cb842012-10-19 18:19:11 -070054 DisplayType type,
Jesse Hallffe1f192013-03-22 15:13:48 -070055 int32_t hwcId,
Jamie Gennisdd3cb842012-10-19 18:19:11 -070056 bool isSecure,
57 const wp<IBinder>& displayToken,
Jesse Hall99c7dbb2013-03-14 14:29:29 -070058 const sp<DisplaySurface>& displaySurface,
Mathias Agopiana4912602012-07-12 14:25:33 -070059 EGLConfig config)
Mathias Agopian92a979a2012-08-02 18:32:23 -070060 : mFlinger(flinger),
Jesse Hallffe1f192013-03-22 15:13:48 -070061 mType(type), mHwcDisplayId(hwcId),
Chih-Wei Huang27e25622013-01-07 17:33:56 +080062 mDisplayToken(displayToken),
Jesse Hall99c7dbb2013-03-14 14:29:29 -070063 mDisplaySurface(displaySurface),
Mathias Agopian92a979a2012-08-02 18:32:23 -070064 mDisplay(EGL_NO_DISPLAY),
65 mSurface(EGL_NO_SURFACE),
66 mContext(EGL_NO_CONTEXT),
Mathias Agopian92a979a2012-08-02 18:32:23 -070067 mDisplayWidth(), mDisplayHeight(), mFormat(),
68 mFlags(),
69 mPageFlipCount(),
Jamie Gennisdd3cb842012-10-19 18:19:11 -070070 mIsSecure(isSecure),
Mathias Agopian92a979a2012-08-02 18:32:23 -070071 mSecureLayerVisible(false),
72 mScreenAcquired(false),
Jesse Hall01e29052013-02-19 16:13:35 -080073 mLayerStack(NO_LAYER_STACK),
Mathias Agopianda8d0a52012-09-04 15:05:38 -070074 mOrientation()
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080075{
Jesse Hall99c7dbb2013-03-14 14:29:29 -070076 mNativeWindow = new Surface(mDisplaySurface->getIGraphicBufferProducer());
Jesse Hallffe1f192013-03-22 15:13:48 -070077 ANativeWindow* const window = mNativeWindow.get();
78
79 int format;
80 window->query(window, NATIVE_WINDOW_FORMAT, &format);
81
82 /*
83 * Create our display's surface
84 */
85
86 EGLSurface surface;
87 EGLint w, h;
88 EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
89 surface = eglCreateWindowSurface(display, config, window, NULL);
90 eglQuerySurface(display, surface, EGL_WIDTH, &mDisplayWidth);
91 eglQuerySurface(display, surface, EGL_HEIGHT, &mDisplayHeight);
92
93 mDisplay = display;
94 mSurface = surface;
95 mFormat = format;
96 mPageFlipCount = 0;
97 mViewport.makeInvalid();
98 mFrame.makeInvalid();
99
100 // virtual displays are always considered enabled
101 mScreenAcquired = (mType >= DisplayDevice::DISPLAY_VIRTUAL);
102
103 // Name the display. The name will be replaced shortly if the display
104 // was created with createDisplay().
105 switch (mType) {
106 case DISPLAY_PRIMARY:
107 mDisplayName = "Built-in Screen";
108 break;
109 case DISPLAY_EXTERNAL:
110 mDisplayName = "HDMI Screen";
111 break;
112 default:
113 mDisplayName = "Virtual Screen"; // e.g. Overlay #n
114 break;
115 }
116
117 // initialize the display orientation transform.
118 setProjection(DisplayState::eOrientationDefault, mViewport, mFrame);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800119}
120
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700121DisplayDevice::~DisplayDevice() {
Mathias Agopian92a979a2012-08-02 18:32:23 -0700122 if (mSurface != EGL_NO_SURFACE) {
123 eglDestroySurface(mDisplay, mSurface);
124 mSurface = EGL_NO_SURFACE;
125 }
126}
127
Jesse Hall02d86562013-03-25 14:43:23 -0700128void DisplayDevice::disconnect(HWComposer& hwc) {
129 if (mHwcDisplayId >= 0) {
130 hwc.disconnectDisplay(mHwcDisplayId);
131 if (mHwcDisplayId >= DISPLAY_VIRTUAL)
132 hwc.freeDisplayId(mHwcDisplayId);
133 mHwcDisplayId = -1;
134 }
135}
136
Mathias Agopian92a979a2012-08-02 18:32:23 -0700137bool DisplayDevice::isValid() const {
138 return mFlinger != NULL;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800139}
140
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700141int DisplayDevice::getWidth() const {
Mathias Agopiana4912602012-07-12 14:25:33 -0700142 return mDisplayWidth;
143}
144
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700145int DisplayDevice::getHeight() const {
Mathias Agopiana4912602012-07-12 14:25:33 -0700146 return mDisplayHeight;
147}
148
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700149PixelFormat DisplayDevice::getFormat() const {
Mathias Agopiana4912602012-07-12 14:25:33 -0700150 return mFormat;
151}
152
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700153EGLSurface DisplayDevice::getEGLSurface() const {
Mathias Agopiana4912602012-07-12 14:25:33 -0700154 return mSurface;
155}
156
Mathias Agopian9e2463e2012-09-21 18:26:16 -0700157void DisplayDevice::setDisplayName(const String8& displayName) {
158 if (!displayName.isEmpty()) {
159 // never override the name with an empty name
160 mDisplayName = displayName;
161 }
162}
163
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700164uint32_t DisplayDevice::getPageFlipCount() const {
Mathias Agopian076b1cc2009-04-10 14:24:30 -0700165 return mPageFlipCount;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800166}
167
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700168status_t DisplayDevice::compositionComplete() const {
Jesse Hall99c7dbb2013-03-14 14:29:29 -0700169 return mDisplaySurface->compositionComplete();
Mathias Agopian74faca22009-09-17 16:18:16 -0700170}
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800171
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700172void DisplayDevice::flip(const Region& dirty) const
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800173{
Mathias Agopian875d8e12013-06-07 15:35:48 -0700174 mFlinger->getRenderEngine().checkErrors();
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800175
176 EGLDisplay dpy = mDisplay;
177 EGLSurface surface = mSurface;
178
Jesse Hall01e29052013-02-19 16:13:35 -0800179#ifdef EGL_ANDROID_swap_rectangle
Mathias Agopiandf3ca302009-05-04 19:29:25 -0700180 if (mFlags & SWAP_RECTANGLE) {
Mathias Agopianb8a55602009-06-26 19:06:36 -0700181 const Region newDirty(dirty.intersect(bounds()));
182 const Rect b(newDirty.getBounds());
Mathias Agopiandf3ca302009-05-04 19:29:25 -0700183 eglSetSwapRectangleANDROID(dpy, surface,
184 b.left, b.top, b.width(), b.height());
Jesse Hall01e29052013-02-19 16:13:35 -0800185 }
Mathias Agopian5e78e092009-06-11 17:19:54 -0700186#endif
Mathias Agopiand8707032012-09-18 01:21:55 -0700187
Mathias Agopian076b1cc2009-04-10 14:24:30 -0700188 mPageFlipCount++;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800189}
190
Mathias Agopianda27af92012-09-13 18:17:13 -0700191void DisplayDevice::swapBuffers(HWComposer& hwc) const {
Jesse Hall99c7dbb2013-03-14 14:29:29 -0700192 // We need to call eglSwapBuffers() unless:
193 // (a) there was no GLES composition this frame, or
194 // (b) we're using a legacy HWC with no framebuffer target support (in
195 // which case HWComposer::commit() handles things).
196 if (hwc.initCheck() != NO_ERROR ||
197 (hwc.hasGlesComposition(mHwcDisplayId) &&
198 hwc.supportsFramebufferTarget())) {
199 EGLBoolean success = eglSwapBuffers(mDisplay, mSurface);
200 if (!success) {
201 EGLint error = eglGetError();
202 if (error == EGL_CONTEXT_LOST ||
203 mType == DisplayDevice::DISPLAY_PRIMARY) {
204 LOG_ALWAYS_FATAL("eglSwapBuffers(%p, %p) failed with 0x%08x",
205 mDisplay, mSurface, error);
206 } else {
207 ALOGE("eglSwapBuffers(%p, %p) failed with 0x%08x",
208 mDisplay, mSurface, error);
Mathias Agopianda27af92012-09-13 18:17:13 -0700209 }
210 }
211 }
Mathias Agopian52e21482012-09-24 18:07:21 -0700212
Jesse Hall99c7dbb2013-03-14 14:29:29 -0700213 status_t result = mDisplaySurface->advanceFrame();
214 if (result != NO_ERROR) {
215 ALOGE("[%s] failed pushing new frame to HWC: %d",
216 mDisplayName.string(), result);
Mathias Agopian32341382012-09-25 19:16:28 -0700217 }
Mathias Agopianda27af92012-09-13 18:17:13 -0700218}
219
220void DisplayDevice::onSwapBuffersCompleted(HWComposer& hwc) const {
221 if (hwc.initCheck() == NO_ERROR) {
Jesse Hall851cfe82013-03-20 13:44:00 -0700222 mDisplaySurface->onFrameCommitted();
Mathias Agopianda27af92012-09-13 18:17:13 -0700223 }
224}
225
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700226uint32_t DisplayDevice::getFlags() const
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800227{
228 return mFlags;
229}
230
Mathias Agopian875d8e12013-06-07 15:35:48 -0700231EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, EGLContext ctx) const {
Mathias Agopianda8d0a52012-09-04 15:05:38 -0700232 EGLBoolean result = EGL_TRUE;
Mathias Agopian52bbb1a2012-07-31 19:01:53 -0700233 EGLSurface sur = eglGetCurrentSurface(EGL_DRAW);
Mathias Agopian875d8e12013-06-07 15:35:48 -0700234 if (sur != mSurface) {
235 result = eglMakeCurrent(dpy, mSurface, mSurface, ctx);
Mathias Agopianda8d0a52012-09-04 15:05:38 -0700236 if (result == EGL_TRUE) {
Mathias Agopian875d8e12013-06-07 15:35:48 -0700237 setViewportAndProjection();
Mathias Agopianda8d0a52012-09-04 15:05:38 -0700238 }
Mathias Agopian52bbb1a2012-07-31 19:01:53 -0700239 }
Mathias Agopianda8d0a52012-09-04 15:05:38 -0700240 return result;
Mathias Agopian52bbb1a2012-07-31 19:01:53 -0700241}
242
Mathias Agopian875d8e12013-06-07 15:35:48 -0700243void DisplayDevice::setViewportAndProjection() const {
244 size_t w = mDisplayWidth;
245 size_t h = mDisplayHeight;
246 mFlinger->getRenderEngine().setViewportAndProjection(w, h);
Mathias Agopianbae92d02012-09-28 01:00:47 -0700247}
248
Mathias Agopian1b031492012-06-20 17:51:20 -0700249// ----------------------------------------------------------------------------
250
Mathias Agopian13127d82013-03-05 17:47:11 -0800251void DisplayDevice::setVisibleLayersSortedByZ(const Vector< sp<Layer> >& layers) {
Mathias Agopian3b1d2b62012-07-11 13:48:17 -0700252 mVisibleLayersSortedByZ = layers;
Mathias Agopianef7b9c72012-08-10 15:22:19 -0700253 mSecureLayerVisible = false;
Mathias Agopian3b1d2b62012-07-11 13:48:17 -0700254 size_t count = layers.size();
255 for (size_t i=0 ; i<count ; i++) {
Mathias Agopian13127d82013-03-05 17:47:11 -0800256 const sp<Layer>& layer(layers[i]);
Mathias Agopianf5f714a2013-02-26 16:54:05 -0800257 if (layer->isSecure()) {
Mathias Agopian3b1d2b62012-07-11 13:48:17 -0700258 mSecureLayerVisible = true;
259 }
260 }
261}
262
Mathias Agopian13127d82013-03-05 17:47:11 -0800263const Vector< sp<Layer> >& DisplayDevice::getVisibleLayersSortedByZ() const {
Mathias Agopian3b1d2b62012-07-11 13:48:17 -0700264 return mVisibleLayersSortedByZ;
265}
266
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700267bool DisplayDevice::getSecureLayerVisible() const {
Mathias Agopian3b1d2b62012-07-11 13:48:17 -0700268 return mSecureLayerVisible;
269}
270
Mathias Agopiancd60f992012-08-16 16:28:27 -0700271Region DisplayDevice::getDirtyRegion(bool repaintEverything) const {
272 Region dirty;
Mathias Agopiancd60f992012-08-16 16:28:27 -0700273 if (repaintEverything) {
274 dirty.set(getBounds());
275 } else {
Mathias Agopianda8d0a52012-09-04 15:05:38 -0700276 const Transform& planeTransform(mGlobalTransform);
Mathias Agopiancd60f992012-08-16 16:28:27 -0700277 dirty = planeTransform.transform(this->dirtyRegion);
278 dirty.andSelf(getBounds());
279 }
280 return dirty;
281}
282
Mathias Agopian3b1d2b62012-07-11 13:48:17 -0700283// ----------------------------------------------------------------------------
284
Mathias Agopiand3ee2312012-08-02 14:01:42 -0700285bool DisplayDevice::canDraw() const {
286 return mScreenAcquired;
287}
288
289void DisplayDevice::releaseScreen() const {
290 mScreenAcquired = false;
291}
292
293void DisplayDevice::acquireScreen() const {
294 mScreenAcquired = true;
295}
296
297bool DisplayDevice::isScreenAcquired() const {
298 return mScreenAcquired;
299}
300
301// ----------------------------------------------------------------------------
302
Mathias Agopian28947d72012-08-08 18:51:15 -0700303void DisplayDevice::setLayerStack(uint32_t stack) {
304 mLayerStack = stack;
305 dirtyRegion.set(bounds());
306}
307
308// ----------------------------------------------------------------------------
309
Mathias Agopian0f2f5ff2012-07-31 23:09:07 -0700310status_t DisplayDevice::orientationToTransfrom(
Mathias Agopian1b031492012-06-20 17:51:20 -0700311 int orientation, int w, int h, Transform* tr)
312{
313 uint32_t flags = 0;
314 switch (orientation) {
Mathias Agopian3165cc22012-08-08 19:42:09 -0700315 case DisplayState::eOrientationDefault:
Mathias Agopian1b031492012-06-20 17:51:20 -0700316 flags = Transform::ROT_0;
317 break;
Mathias Agopian3165cc22012-08-08 19:42:09 -0700318 case DisplayState::eOrientation90:
Mathias Agopian1b031492012-06-20 17:51:20 -0700319 flags = Transform::ROT_90;
320 break;
Mathias Agopian3165cc22012-08-08 19:42:09 -0700321 case DisplayState::eOrientation180:
Mathias Agopian1b031492012-06-20 17:51:20 -0700322 flags = Transform::ROT_180;
323 break;
Mathias Agopian3165cc22012-08-08 19:42:09 -0700324 case DisplayState::eOrientation270:
Mathias Agopian1b031492012-06-20 17:51:20 -0700325 flags = Transform::ROT_270;
326 break;
327 default:
328 return BAD_VALUE;
329 }
330 tr->set(flags, w, h);
331 return NO_ERROR;
332}
333
Mathias Agopian00e8c7a2012-09-04 19:30:46 -0700334void DisplayDevice::setProjection(int orientation,
Mathias Agopianf5f714a2013-02-26 16:54:05 -0800335 const Rect& newViewport, const Rect& newFrame) {
336 Rect viewport(newViewport);
337 Rect frame(newFrame);
338
339 const int w = mDisplayWidth;
340 const int h = mDisplayHeight;
341
342 Transform R;
343 DisplayDevice::orientationToTransfrom(orientation, w, h, &R);
344
345 if (!frame.isValid()) {
346 // the destination frame can be invalid if it has never been set,
347 // in that case we assume the whole display frame.
348 frame = Rect(w, h);
349 }
350
351 if (viewport.isEmpty()) {
352 // viewport can be invalid if it has never been set, in that case
353 // we assume the whole display size.
354 // it's also invalid to have an empty viewport, so we handle that
355 // case in the same way.
356 viewport = Rect(w, h);
357 if (R.getOrientation() & Transform::ROT_90) {
358 // viewport is always specified in the logical orientation
359 // of the display (ie: post-rotation).
360 swap(viewport.right, viewport.bottom);
361 }
362 }
363
364 dirtyRegion.set(getBounds());
365
366 Transform TL, TP, S;
367 float src_width = viewport.width();
368 float src_height = viewport.height();
369 float dst_width = frame.width();
370 float dst_height = frame.height();
371 if (src_width != dst_width || src_height != dst_height) {
372 float sx = dst_width / src_width;
373 float sy = dst_height / src_height;
374 S.set(sx, 0, 0, sy);
375 }
376
377 float src_x = viewport.left;
378 float src_y = viewport.top;
379 float dst_x = frame.left;
380 float dst_y = frame.top;
381 TL.set(-src_x, -src_y);
382 TP.set(dst_x, dst_y);
383
384 // The viewport and frame are both in the logical orientation.
385 // Apply the logical translation, scale to physical size, apply the
386 // physical translation and finally rotate to the physical orientation.
387 mGlobalTransform = R * TP * S * TL;
388
389 const uint8_t type = mGlobalTransform.getType();
390 mNeedsFiltering = (!mGlobalTransform.preserveRects() ||
391 (type >= Transform::SCALE));
392
393 mScissor = mGlobalTransform.transform(viewport);
394 if (mScissor.isEmpty()) {
Mathias Agopian6c7f25a2013-05-09 20:37:10 -0700395 mScissor = getBounds();
Mathias Agopianf5f714a2013-02-26 16:54:05 -0800396 }
397
Mathias Agopianda8d0a52012-09-04 15:05:38 -0700398 mOrientation = orientation;
Mathias Agopian00e8c7a2012-09-04 19:30:46 -0700399 mViewport = viewport;
400 mFrame = frame;
Mathias Agopian1b031492012-06-20 17:51:20 -0700401}
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700402
Mathias Agopian74d211a2013-04-22 16:55:35 +0200403void DisplayDevice::dump(String8& result) const {
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700404 const Transform& tr(mGlobalTransform);
Mathias Agopian74d211a2013-04-22 16:55:35 +0200405 result.appendFormat(
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700406 "+ DisplayDevice: %s\n"
Jesse Hall02d86562013-03-25 14:43:23 -0700407 " type=%x, hwcId=%d, layerStack=%u, (%4dx%4d), ANativeWindow=%p, orient=%2d (type=%08x), "
Jamie Gennisdd3cb842012-10-19 18:19:11 -0700408 "flips=%u, isSecure=%d, secureVis=%d, acquired=%d, numLayers=%u\n"
Mathias Agopian766dc492012-10-30 18:08:06 -0700409 " v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], s:[%d,%d,%d,%d],"
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700410 "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n",
Jesse Hall02d86562013-03-25 14:43:23 -0700411 mDisplayName.string(), mType, mHwcDisplayId,
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700412 mLayerStack, mDisplayWidth, mDisplayHeight, mNativeWindow.get(),
413 mOrientation, tr.getType(), getPageFlipCount(),
Jamie Gennisdd3cb842012-10-19 18:19:11 -0700414 mIsSecure, mSecureLayerVisible, mScreenAcquired, mVisibleLayersSortedByZ.size(),
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700415 mViewport.left, mViewport.top, mViewport.right, mViewport.bottom,
416 mFrame.left, mFrame.top, mFrame.right, mFrame.bottom,
Mathias Agopian766dc492012-10-30 18:08:06 -0700417 mScissor.left, mScissor.top, mScissor.right, mScissor.bottom,
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700418 tr[0][0], tr[1][0], tr[2][0],
419 tr[0][1], tr[1][1], tr[2][1],
420 tr[0][2], tr[1][2], tr[2][2]);
421
Jesse Hall99c7dbb2013-03-14 14:29:29 -0700422 String8 surfaceDump;
423 mDisplaySurface->dump(surfaceDump);
424 result.append(surfaceDump);
Mathias Agopian1d12d8a2012-09-18 01:38:00 -0700425}