diff options
-rw-r--r-- | WebCore/platform/graphics/android/BaseTile.cpp | 33 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/FontCustomPlatformData.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp | 12 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GLWebViewState.cpp | 14 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GradientAndroid.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsContextAndroid.cpp | 6 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.cpp | 10 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/PatternAndroid.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/jni/PictureSet.cpp | 14 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/nav/CachedRoot.cpp | 6 | ||||
-rw-r--r-- | WebKit/android/nav/FindCanvas.cpp | 8 | ||||
-rw-r--r-- | WebKit/android/nav/SelectText.cpp | 16 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 6 | ||||
-rw-r--r-- | WebKit/android/plugins/ANPTypefaceInterface.cpp | 4 | ||||
-rw-r--r-- | WebKit/android/plugins/PluginWidgetAndroid.cpp | 4 |
16 files changed, 88 insertions, 57 deletions
diff --git a/WebCore/platform/graphics/android/BaseTile.cpp b/WebCore/platform/graphics/android/BaseTile.cpp index bfd5118..9499870 100644 --- a/WebCore/platform/graphics/android/BaseTile.cpp +++ b/WebCore/platform/graphics/android/BaseTile.cpp @@ -254,7 +254,27 @@ void BaseTile::paintBitmap() float w = tileWidth * invScale; float h = tileHeight * invScale; - SkCanvas* canvas = texture->canvas(); + SkCanvas* canvas; + +#ifdef USE_SKIA_GPU + GLuint fboId; + glGenFramebuffersEXT(1, &fboId); + glBindFramebuffer(GL_FRAMEBUFFER, fboId); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureInfo->m_textureId, 0); + glCheckFramebufferStatus(GL_FRAMEBUFFER)); // should return GL_FRAMEBUFFER_COMPLETE + + //Do I need to assign a width/height/format? + + GrContext* context = gr_get_global_ctx(); + context->resetContext(); + GrRenderTarget* target = context->createPlatformRenderTarget(fboId, tileWidth, tileHeight); + SkCanvas tmpCanvas; + SkDevice* device = new SkGpuDevice(context, bm, target); + tmpCanvas.setDevice(device)->unref(); + canvas = &tmpCanvas; +#else + canvas = texture->canvas(); +#endif canvas->save(); canvas->drawColor(tiledPage->glWebViewState()->getBackgroundColor()); @@ -279,7 +299,18 @@ void BaseTile::paintBitmap() } texture->setTile(x, y); + +#ifdef USE_SKIA_GPU + // set the texture info w/h/format + textureInfo->m_width = tileWidth; + textureInfo->m_height = tileHeight; + texture->producerReleaseAndSwap(); + + glBindFramebuffer(GL_FRAMEBUFFER, 0); // rebind the standard FBO + glDeleteFramebuffers(1, &fboId); +#else texture->producerUpdate(textureInfo); +#endif m_atomicSync.lock(); m_lastPaintedPicture = pictureCount; diff --git a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp index e17e532..4795d9e 100644 --- a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp +++ b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp @@ -35,13 +35,13 @@ namespace WebCore { FontCustomPlatformData::FontCustomPlatformData(SkTypeface* face) { - face->safeRef(); + SkSafeRef(face); m_typeface = face; } FontCustomPlatformData::~FontCustomPlatformData() { - m_typeface->safeUnref(); + SkSafeUnref(m_typeface); // the unref is enough to release the font data... } diff --git a/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp b/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp index 974b828..194bc62 100644 --- a/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp +++ b/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp @@ -83,7 +83,7 @@ FontPlatformData::FontPlatformData() FontPlatformData::FontPlatformData(const FontPlatformData& src) { if (hashTableDeletedFontValue() != src.mTypeface) { - src.mTypeface->safeRef(); + SkSafeRef(src.mTypeface); } mTypeface = src.mTypeface; @@ -101,7 +101,7 @@ FontPlatformData::FontPlatformData(SkTypeface* tf, float textSize, bool fakeBold : mTypeface(tf), mTextSize(textSize), mFakeBold(fakeBold), mFakeItalic(fakeItalic) { if (hashTableDeletedFontValue() != mTypeface) { - mTypeface->safeRef(); + SkSafeRef(mTypeface); } inc_count(); @@ -113,7 +113,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize) m_harfbuzzFace(src.m_harfbuzzFace) { if (hashTableDeletedFontValue() != mTypeface) { - mTypeface->safeRef(); + SkSafeRef(mTypeface); } inc_count(); @@ -135,17 +135,17 @@ FontPlatformData::~FontPlatformData() #endif if (hashTableDeletedFontValue() != mTypeface) { - mTypeface->safeUnref(); + SkSafeUnref(mTypeface); } } FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src) { if (hashTableDeletedFontValue() != src.mTypeface) { - src.mTypeface->safeRef(); + SkSafeRef(src.mTypeface); } if (hashTableDeletedFontValue() != mTypeface) { - mTypeface->safeUnref(); + SkSafeUnref(mTypeface); } mTypeface = src.mTypeface; diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp index 3d2f6c8..b3c5b02 100644 --- a/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -85,7 +85,7 @@ GLWebViewState::GLWebViewState(android::Mutex* buttonMutex) GLWebViewState::~GLWebViewState() { - m_currentBaseLayer->safeUnref(); + SkSafeUnref(m_currentBaseLayer); delete m_tiledPageA; delete m_tiledPageB; #ifdef DEBUG_COUNT @@ -110,8 +110,8 @@ void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const IntRect& rect, // We only update the layers if we are not currently // waiting for a tiledPage to be painted if (m_baseLayerUpdate) { - layer->safeRef(); - m_currentBaseLayer->safeUnref(); + SkSafeRef(layer); + SkSafeUnref(m_currentBaseLayer); m_currentBaseLayer = layer; } inval(rect); @@ -122,8 +122,8 @@ void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const IntRect& rect, void GLWebViewState::unlockBaseLayerUpdate() { m_baseLayerUpdate = true; android::Mutex::Autolock lock(m_baseLayerLock); - m_baseLayer->safeRef(); - m_currentBaseLayer->safeUnref(); + SkSafeRef(m_baseLayer); + SkSafeUnref(m_currentBaseLayer); m_currentBaseLayer = m_baseLayer; inval(m_invalidateRect); IntRect empty; @@ -303,12 +303,12 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, float scale, SkColo { m_baseLayerLock.lock(); BaseLayerAndroid* baseLayer = m_currentBaseLayer; - baseLayer->safeRef(); + SkSafeRef(baseLayer); m_baseLayerLock.unlock(); if (!baseLayer) return false; bool ret = baseLayer->drawGL(rect, viewport, scale, color); - baseLayer->safeUnref(); + SkSafeUnref(baseLayer); return ret; } diff --git a/WebCore/platform/graphics/android/GradientAndroid.cpp b/WebCore/platform/graphics/android/GradientAndroid.cpp index 72ae336..b8dc9dd 100644 --- a/WebCore/platform/graphics/android/GradientAndroid.cpp +++ b/WebCore/platform/graphics/android/GradientAndroid.cpp @@ -38,7 +38,7 @@ class PlatformGradientRec { public: PlatformGradientRec() : m_shader(NULL) {} - ~PlatformGradientRec() { m_shader->safeUnref(); } + ~PlatformGradientRec() { SkSafeUnref(m_shader); } SkShader* m_shader; SkShader::TileMode m_tileMode; @@ -102,7 +102,7 @@ SkShader* Gradient::getShader(SkShader::TileMode mode) s = new SkColorShader(0); // zap our previous shader, if present - m_gradient->m_shader->safeUnref(); + SkSafeUnref(m_gradient->m_shader); m_gradient->m_shader = s; m_gradient->m_tileMode = mode; SkMatrix matrix = m_gradientSpaceTransformation; diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index 06a53b1..dce7b27 100644 --- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -128,13 +128,13 @@ public: , useAA(other.useAA) { path = deepCopyPtr<SkPath>(other.path); - pathEffect->safeRef(); + SkSafeRef(pathEffect); } ~State() { delete path; - pathEffect->safeUnref(); + SkSafeUnref(pathEffect); } void setShadow(int radius, int dx, int dy, SkColor c) @@ -1043,7 +1043,7 @@ void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset) for (unsigned int i = 0; i < count; i++) intervals[i] = SkFloatToScalar(dashes[i % dashLength]); SkPathEffect **effectPtr = &m_data->getState()->pathEffect; - (*effectPtr)->safeUnref(); + SkSafeUnref(*effectPtr); *effectPtr = new SkDashPathEffect(intervals, count, SkFloatToScalar(dashOffset)); delete[] intervals; diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 35979f6..db40856 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -99,7 +99,7 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : SkLayer(layer), { m_isFixed = layer.m_isFixed; m_contentsImage = layer.m_contentsImage; - m_contentsImage->safeRef(); + SkSafeRef(m_contentsImage); m_renderLayerPos = layer.m_renderLayerPos; m_transform = layer.m_transform; m_backgroundColor = layer.m_backgroundColor; @@ -192,8 +192,8 @@ LayerAndroid::~LayerAndroid() removeTexture(0); removeChildren(); delete m_extra; - m_contentsImage->safeUnref(); - m_recordingPicture->safeUnref(); + SkSafeUnref(m_contentsImage); + SkSafeUnref(m_recordingPicture); m_animations.clear(); #ifdef DEBUG_COUNT ClassTracker::instance()->decrement("LayerAndroid"); @@ -1052,11 +1052,11 @@ bool LayerAndroid::prepareContext(bool force) || (m_recordingPicture && ((m_recordingPicture->width() != (int) getSize().width()) || (m_recordingPicture->height() != (int) getSize().height())))) { - m_recordingPicture->safeUnref(); + SkSafeUnref(m_recordingPicture); m_recordingPicture = new SkPicture(); } } else if (m_recordingPicture) { - m_recordingPicture->safeUnref(); + SkSafeUnref(m_recordingPicture); m_recordingPicture = 0; } diff --git a/WebCore/platform/graphics/android/PatternAndroid.cpp b/WebCore/platform/graphics/android/PatternAndroid.cpp index 5a3fd8f..568036c 100644 --- a/WebCore/platform/graphics/android/PatternAndroid.cpp +++ b/WebCore/platform/graphics/android/PatternAndroid.cpp @@ -42,7 +42,7 @@ static SkShader::TileMode toTileMode(bool doRepeat) { void Pattern::platformDestroy() { - m_pattern->safeUnref(); + SkSafeUnref(m_pattern); m_pattern = 0; } diff --git a/WebKit/android/jni/PictureSet.cpp b/WebKit/android/jni/PictureSet.cpp index 98cda23..6dafd26 100644 --- a/WebKit/android/jni/PictureSet.cpp +++ b/WebKit/android/jni/PictureSet.cpp @@ -68,7 +68,7 @@ PictureSet::~PictureSet() void PictureSet::add(const Pictures* temp) { Pictures pictureAndBounds = *temp; - pictureAndBounds.mPicture->safeRef(); + SkSafeRef(pictureAndBounds.mPicture); pictureAndBounds.mWroteElapsed = false; mPictures.append(pictureAndBounds); } @@ -80,7 +80,7 @@ void PictureSet::add(const SkRegion& area, SkPicture* picture, area.getBounds().fLeft, area.getBounds().fTop, area.getBounds().fRight, area.getBounds().fBottom, picture, elapsed, split); - picture->safeRef(); + SkSafeRef(picture); /* if nothing is drawn beneath part of the new picture, mark it as a base */ SkRegion diff = SkRegion(area); Pictures* last = mPictures.end(); @@ -150,7 +150,7 @@ bool PictureSet::build() } } if (tossPicture) { - working->mPicture->safeUnref(); + SkSafeUnref(working->mPicture); working->mPicture = NULL; // mark to redraw } if (working->mPicture == NULL) // may have been set to null elsewhere @@ -211,7 +211,7 @@ void PictureSet::clear() Pictures* last = mPictures.end(); for (Pictures* working = mPictures.begin(); working != last; working++) { working->mArea.setEmpty(); - working->mPicture->safeUnref(); + SkSafeUnref(working->mPicture); } mPictures.clear(); mWidth = mHeight = 0; @@ -362,7 +362,7 @@ public: return true; } - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& , const SkPaint& ) { if (bitmap.width() <= 1 || bitmap.height() <= 1) return; @@ -476,7 +476,7 @@ bool PictureSet::reuseSubdivided(const SkRegion& inval) if ((working->mSplit == false || invalBounds != working->mUnsplit) && inval.contains(working->mArea) == false) continue; - working->mPicture->safeUnref(); + SkSafeUnref(working->mPicture); working->mPicture = NULL; } return true; @@ -526,7 +526,7 @@ void PictureSet::setDrawTimes(const PictureSet& src) void PictureSet::setPicture(size_t i, SkPicture* p) { - mPictures[i].mPicture->safeUnref(); + SkSafeUnref(mPictures[i].mPicture); mPictures[i].mPicture = p; mPictures[i].mEmpty = emptyPicture(p); } diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 66c78b5..727cce3 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -670,7 +670,7 @@ void WebViewCore::recordPictureSet(PictureSet* content) DBG_SET_LOGD("{%d,%d,w=%d,h=%d}", inval.fLeft, inval.fTop, inval.width(), inval.height()); content->add(m_addInval, picture, 0, false); - picture->safeUnref(); + SkSafeUnref(picture); } // Remove any pictures already in the set that are obscured by the new one, // and check to see if any already split pieces need to be redrawn. diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp index 2662071..33e7b4f 100644 --- a/WebKit/android/nav/CachedRoot.cpp +++ b/WebKit/android/nav/CachedRoot.cpp @@ -160,11 +160,11 @@ public: INHERITED::drawPath(path, paint); } - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& matrix, const SkPaint& paint) { mBounder.setType(CommonCheck::kDrawBitmap_Type); mBounder.setIsOpaque(bitmap.isOpaque()); - INHERITED::commonDrawBitmap(bitmap, matrix, paint); + INHERITED::commonDrawBitmap(bitmap, rect, matrix, paint); } virtual void drawSprite(const SkBitmap& bitmap, int left, int top, @@ -508,7 +508,7 @@ protected: // Currently webkit's bitmap draws always seem to be cull'd before this entry // point is called, so we assume that any bitmap that gets here is inside our // tiny clip (may not be true in the future) - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& , const SkPaint& ) { SkPixelRef* pixelRef = bitmap.pixelRef(); if (pixelRef != NULL) { diff --git a/WebKit/android/nav/FindCanvas.cpp b/WebKit/android/nav/FindCanvas.cpp index e1bfd82..2d310b3 100644 --- a/WebKit/android/nav/FindCanvas.cpp +++ b/WebKit/android/nav/FindCanvas.cpp @@ -49,18 +49,18 @@ MatchInfo::MatchInfo() { } MatchInfo::~MatchInfo() { - m_picture->safeUnref(); + SkSafeUnref(m_picture); } MatchInfo::MatchInfo(const MatchInfo& src) { m_layerId = src.m_layerId; m_location = src.m_location; m_picture = src.m_picture; - m_picture->safeRef(); + SkSafeRef(m_picture); } void MatchInfo::set(const SkRegion& region, SkPicture* pic, int layerId) { - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_layerId = layerId; m_location = region; m_picture = pic; @@ -161,7 +161,7 @@ FindCanvas::~FindCanvas() { setBounder(NULL); /* Just in case getAndClear was not called. */ delete mMatches; - mWorkingPicture->safeUnref(); + SkSafeUnref(mWorkingPicture); } // Each version of addMatch returns a rectangle for a match. diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp index 87d1791..fce05f7 100644 --- a/WebKit/android/nav/SelectText.cpp +++ b/WebKit/android/nav/SelectText.cpp @@ -1208,7 +1208,7 @@ public: virtual void drawPath(const SkPath& path, const SkPaint& paint) { } - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& matrix, const SkPaint& paint) { } @@ -1386,13 +1386,13 @@ SelectText::SelectText() paint.setShader(dropGradient); canvas->drawRect(endDropRect, paint); m_endControl.endRecording(); - fillGradient->safeUnref(); - dropGradient->safeUnref(); + SkSafeUnref(fillGradient); + SkSafeUnref(dropGradient); } SelectText::~SelectText() { - m_picture->safeUnref(); + SkSafeUnref(m_picture); } void SelectText::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval) @@ -1400,9 +1400,9 @@ void SelectText::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval) if (m_layerId != layer->uniqueId()) return; // reset m_picture to match m_layerId - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_picture = layer->picture(); - m_picture->safeRef(); + SkSafeRef(m_picture); DBG_NAV_LOGD("m_extendSelection=%d m_drawPointer=%d layer [%d]", m_extendSelection, m_drawPointer, layer->uniqueId()); if (m_extendSelection) @@ -1799,7 +1799,7 @@ void SelectText::reset() m_lastEnd.setEmpty(); m_extendSelection = false; m_startSelection = false; - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_picture = 0; m_layerId = 0; } @@ -1858,7 +1858,7 @@ bool SelectText::startSelection(const CachedRoot* root, const IntRect& vis, m_wordSelection = false; m_startOffset.set(x, y); DBG_NAV_LOGD("x/y=(%d,%d)", x, y); - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_picture = root->pictureAt(&x, &y, &m_layerId); DBG_NAV_LOGD("m_picture=%p m_layerId=%d x/y=(%d,%d)", m_picture, m_layerId, x, y); diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index edd362c..177a9ce 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -210,7 +210,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl) : #endif delete m_frameCacheUI; delete m_navPictureUI; - m_baseLayer->safeUnref(); + SkSafeUnref(m_baseLayer); delete m_glDrawFunctor; } @@ -686,7 +686,7 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer) } m_viewImpl->gFrameCacheMutex.lock(); delete m_frameCacheUI; - m_navPictureUI->safeUnref(); + SkSafeUnref(m_navPictureUI); m_viewImpl->m_updatedFrameCache = false; m_frameCacheUI = m_viewImpl->m_frameCacheKit; m_navPictureUI = m_viewImpl->m_navPictureKit; @@ -1396,7 +1396,7 @@ void setBaseLayer(BaseLayerAndroid* layer, WebCore::IntRect& rect, bool showVisu copyScrollPositionRecursive(compositeRoot(), newCompositeRoot); } #endif - m_baseLayer->safeUnref(); + SkSafeUnref(m_baseLayer); m_baseLayer = layer; CachedRoot* root = getFrameCache(DontAllowNewer); if (!root) diff --git a/WebKit/android/plugins/ANPTypefaceInterface.cpp b/WebKit/android/plugins/ANPTypefaceInterface.cpp index 4b2dda2..99734a7 100644 --- a/WebKit/android/plugins/ANPTypefaceInterface.cpp +++ b/WebKit/android/plugins/ANPTypefaceInterface.cpp @@ -46,11 +46,11 @@ static int32_t anp_getRefCount(const ANPTypeface* tf) { } static void anp_ref(ANPTypeface* tf) { - tf->safeRef(); + SkSafeRef(tf); } static void anp_unref(ANPTypeface* tf) { - tf->safeUnref(); + SkSafeUnref(tf); } static ANPTypefaceStyle anp_getStyle(const ANPTypeface* tf) { diff --git a/WebKit/android/plugins/PluginWidgetAndroid.cpp b/WebKit/android/plugins/PluginWidgetAndroid.cpp index be89a68..d7d4fa7 100644 --- a/WebKit/android/plugins/PluginWidgetAndroid.cpp +++ b/WebKit/android/plugins/PluginWidgetAndroid.cpp @@ -95,7 +95,7 @@ PluginWidgetAndroid::~PluginWidgetAndroid() { env->DeleteGlobalRef(m_embeddedView); } - m_flipPixelRef->safeUnref(); + SkSafeUnref(m_flipPixelRef); if (m_layer) m_layer->unref(); @@ -148,7 +148,7 @@ void PluginWidgetAndroid::setWindow(NPWindow* window, bool isTransparent) { layoutSurface(boundsChanged); if (m_drawingModel != kSurface_ANPDrawingModel) { - m_flipPixelRef->safeUnref(); + SkSafeUnref(m_flipPixelRef); m_flipPixelRef = new SkFlipPixelRef(computeConfig(isTransparent), window->width, window->height); } |