зеркало из https://github.com/mozilla/moz-skia.git
Minor fixes for SampleApp.
- Add a comment for invalidating in onSizeChange. - Call base constructor for SkOSWindow_Unix. - Call onSizeChange in SampleWindow constructor so fZoomCenter gets set. git-svn-id: http://skia.googlecode.com/svn/trunk@1627 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
cae6b3f1e8
Коммит
b4490c7435
|
@ -398,6 +398,12 @@ SampleWindow::SampleWindow(void* hwnd) : INHERITED(hwnd) {
|
|||
fCurrIndex = 0;
|
||||
this->loadView(fSamples[fCurrIndex]());
|
||||
|
||||
// If another constructor set our dimensions, ensure that our
|
||||
// onSizeChange gets called.
|
||||
if (this->height() && this->width()) {
|
||||
this->onSizeChange();
|
||||
}
|
||||
|
||||
#ifdef SK_BUILD_FOR_MAC
|
||||
testpdf();
|
||||
#endif
|
||||
|
@ -1365,6 +1371,8 @@ void SampleWindow::onSizeChange() {
|
|||
fZoomCenterY = SkScalarHalf(this->height());
|
||||
|
||||
#ifdef ANDROID
|
||||
// FIXME: The first draw after a size change does not work on Android, so
|
||||
// we post an invalidate.
|
||||
postInvalDelay(this->getSinkID());
|
||||
#endif
|
||||
this->updateTitle(); // to refresh our config
|
||||
|
|
|
@ -25,7 +25,7 @@ const int HEIGHT = 500;
|
|||
const long EVENT_MASK = StructureNotifyMask|ButtonPressMask|ButtonReleaseMask
|
||||
|ExposureMask|PointerMotionMask|KeyPressMask|KeyReleaseMask;
|
||||
|
||||
SkOSWindow::SkOSWindow(void* unused) : fGLAttached(false), fVi(0)
|
||||
SkOSWindow::SkOSWindow(void* unused) : INHERITED(), fGLAttached(false), fVi(0)
|
||||
{
|
||||
fUnixWindow.fDisplay = XOpenDisplay(NULL);
|
||||
Display* dsp = fUnixWindow.fDisplay;
|
||||
|
|
Загрузка…
Ссылка в новой задаче