Move unix_test_app/main.cpp to src/views/unix/skia_unix.cpp

Review URL: https://codereview.appspot.com/5881048

git-svn-id: http://skia.googlecode.com/svn/trunk@3466 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
epoger@google.com 2012-03-22 15:37:22 +00:00
Родитель 5aab34030f
Коммит c62923d6ad
4 изменённых файлов: 2 добавлений и 85 удалений

Просмотреть файл

@ -76,6 +76,7 @@
#*nix
'../src/views/unix/SkOSWindow_Unix.cpp',
'../src/views/unix/keysym2ucs.c',
'../src/views/unix/skia_unix.cpp',
#windows
'../src/views/win/SkOSWindow_win.cpp',
@ -102,13 +103,11 @@
],
}],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
'sources': [
'../unix_test_app/main.cpp',
],
},{
'sources!': [
'../src/views/unix/SkOSWindow_Unix.cpp',
'../src/views/unix/keysym2ucs.c',
'../src/views/unix/skia_unix.cpp',
],
}],
[ 'skia_os == "win"', {

Просмотреть файл

Просмотреть файл

@ -1,34 +0,0 @@
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SampleCode.h"
#include "SkCanvas.h"
#include "SkColor.h"
#include "SkEvent.h"
#include "SkView.h"
class DrawBlue : public SkView {
public:
DrawBlue() {}
protected:
virtual void onDraw(SkCanvas* canvas) {
canvas->drawColor(SK_ColorBLUE);
}
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt)) {
SampleCode::TitleR(evt, "DrawBlue");
return true;
}
return this->INHERITED::onQuery(evt);
}
private:
typedef SkView INHERITED;
};
static SkView* MyFactory() { return new DrawBlue; }
static SkViewRegister reg(MyFactory);

Просмотреть файл

@ -1,48 +0,0 @@
# Build the unix test app
C_INCLUDES := -I../include/core \
-I../include/config \
-I../include/effects \
-I../include/images \
-I../include/utils \
-I../include/views \
-I../include/xml \
-I../include/gpu \
-I../gpu/include \
-I../include/utils/unix \
-I../samplecode \
-I../src/core
VPATH = libs:../src/ports:../samplecode:../src/core:../src/utils/unix
#generate debugging info
CFLAGS = -g
SRC_LIST := main.cpp SkOSWindow_Unix.cpp SkXMLParser_empty.cpp SkDebug.cpp ../gpu/src/unix/GrGLDefaultInterface_unix.cpp
#views files
include ../src/views/views_files.mk
SRC_LIST += $(addprefix ../src/views/, $(SOURCE))
#xml
include ../src/xml/xml_files.mk
SRC_LIST += $(addprefix ../src/xml/, $(SOURCE))
#include the samples
include ../samplecode/samplecode_files.mk
SRC_LIST += $(addprefix ../samplecode/, $(SOURCE))
out/output: $(SRC_LIST) out/keysym2ucs.o ../out/libskia.a -lX11 -lpthread -lz -lfreetype -lGL -lpng
g++ $(C_INCLUDES) $(CFLAGS) $^ -o $@
out/keysym2ucs.o: ../src/utils/unix/keysym2ucs.c
@mkdir -p $(dir $@)
@gcc -c $(C_INCLUDES) $(CFLAGS) $^ -o $@
../out/libskia.a:
@$(MAKE) -C ../ SKIA_SAMPLES_FOR_X=true
clean:
rm -rf ../out # Copied from ../Makefile
rm -rf out