Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: tools/kilobench/kilobench.cpp

Issue 1845473004: Revert of Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gpu/gl/win/CreatePlatformGLContext_win.cpp ('k') | tools/skiaserve/Request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/kilobench/kilobench.cpp
diff --git a/tools/kilobench/kilobench.cpp b/tools/kilobench/kilobench.cpp
index 81238353e215e19c6a0597b9229e7a3f5ce047eb..c0422d81eb6d2bbfbf0bf62990eb1bcd645a6aa9 100644
--- a/tools/kilobench/kilobench.cpp
+++ b/tools/kilobench/kilobench.cpp
@@ -20,7 +20,6 @@
#include "Timer.h"
#include "VisualSKPBench.h"
#include "gl/GrGLDefines.h"
-#include "gl/GrGLUtil.h"
#include "../private/SkMutex.h"
#include "../private/SkSemaphore.h"
#include "../private/SkGpuFenceSync.h"
@@ -29,8 +28,6 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
-
-using namespace sk_gpu_test;
/*
* This is an experimental GPU only benchmarking program. The initial implementation will only
@@ -147,14 +144,14 @@
void setup() {
fGL->makeCurrent();
// Make sure we're done with whatever came before.
- GR_GL_CALL(fGL->gl(), Finish());
+ SK_GL(*fGL, Finish());
}
SkCanvas* beginTiming(SkCanvas* canvas) { return canvas; }
void endTiming(bool usePlatformSwapBuffers) {
if (fGL) {
- GR_GL_CALL(fGL->gl(), Flush());
+ SK_GL(*fGL, Flush());
if (usePlatformSwapBuffers) {
fGL->swapBuffers();
} else {
@@ -163,7 +160,7 @@
}
}
void finish() {
- GR_GL_CALL(fGL->gl(), Finish());
+ SK_GL(*fGL, Finish());
}
bool needsFrameTiming(int* maxFrameLag) const {
@@ -218,10 +215,10 @@
return true;
}
- GLContext* gl() { return fGL; }
+ SkGLContext* gl() { return fGL; }
private:
- GLContext* fGL;
+ SkGLContext* fGL;
SkAutoTDelete<SkSurface> fSurface;
};
@@ -282,7 +279,7 @@
static double now_ms() { return SkTime::GetNSecs() * 1e-6; }
struct TimingThread {
- TimingThread(GLContext* mainContext)
+ TimingThread(SkGLContext* mainContext)
: fFenceSync(mainContext->fenceSync())
, fMainContext(mainContext)
, fDone(false) {}
@@ -308,8 +305,8 @@
void timingLoop() {
// Create a context which shares display lists with the main thread
- SkAutoTDelete<GLContext> glContext(CreatePlatformGLContext(kNone_GrGLStandard,
- fMainContext));
+ SkAutoTDelete<SkGLContext> glContext(SkCreatePlatformGLContext(kNone_GrGLStandard,
+ fMainContext));
glContext->makeCurrent();
// Basic timing methodology is:
@@ -405,7 +402,7 @@
SyncQueue fFrameEndSyncs;
SkTArray<double> fTimings;
SkMutex fDoneMutex;
- GLContext* fMainContext;
+ SkGLContext* fMainContext;
bool fDone;
};
« no previous file with comments | « tools/gpu/gl/win/CreatePlatformGLContext_win.cpp ('k') | tools/skiaserve/Request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698