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

Unified Diff: gpu/command_buffer/service/async_pixel_transfer_delegate_sync.cc

Issue 16325018: GPU: Factory produces APTManagers instead of APTDelegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
Index: gpu/command_buffer/service/async_pixel_transfer_delegate_sync.cc
diff --git a/gpu/command_buffer/service/async_pixel_transfer_delegate_sync.cc b/gpu/command_buffer/service/async_pixel_transfer_delegate_sync.cc
deleted file mode 100644
index 6eb58f2e9ae2b7dab874cd5027e675b4f9fa44aa..0000000000000000000000000000000000000000
--- a/gpu/command_buffer/service/async_pixel_transfer_delegate_sync.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "gpu/command_buffer/service/async_pixel_transfer_delegate_sync.h"
-
-namespace gpu {
-
-namespace {
-
-class AsyncPixelTransferStateImpl : public AsyncPixelTransferState {
- public:
- AsyncPixelTransferStateImpl() {}
-
- // Implement AsyncPixelTransferState:
- virtual bool TransferIsInProgress() OVERRIDE {
- return false;
- }
-
- private:
- virtual ~AsyncPixelTransferStateImpl() {}
-};
-
-} // namespace
-
-AsyncPixelTransferDelegateSync::AsyncPixelTransferDelegateSync()
- : texture_upload_count_(0) {
-}
-
-AsyncPixelTransferDelegateSync::~AsyncPixelTransferDelegateSync() {}
-
-AsyncPixelTransferState* AsyncPixelTransferDelegateSync::
- CreatePixelTransferState(GLuint texture_id,
- const AsyncTexImage2DParams& define_params) {
- return new AsyncPixelTransferStateImpl;
-}
-
-void AsyncPixelTransferDelegateSync::BindCompletedAsyncTransfers() {
- // Everything is already bound.
-}
-
-void AsyncPixelTransferDelegateSync::AsyncNotifyCompletion(
- const AsyncMemoryParams& mem_params,
- const CompletionCallback& callback) {
- callback.Run(mem_params);
-}
-
-void AsyncPixelTransferDelegateSync::AsyncTexImage2D(
- AsyncPixelTransferState* transfer_state,
- const AsyncTexImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params,
- const base::Closure& bind_callback) {
- // Save the define params to return later during deferred
- // binding of the transfer texture.
- DCHECK(transfer_state);
- void* data = GetAddress(mem_params);
- glTexImage2D(
- tex_params.target,
- tex_params.level,
- tex_params.internal_format,
- tex_params.width,
- tex_params.height,
- tex_params.border,
- tex_params.format,
- tex_params.type,
- data);
- // The texture is already fully bound so just call it now.
- bind_callback.Run();
-}
-
-void AsyncPixelTransferDelegateSync::AsyncTexSubImage2D(
- AsyncPixelTransferState* transfer_state,
- const AsyncTexSubImage2DParams& tex_params,
- const AsyncMemoryParams& mem_params) {
- void* data = GetAddress(mem_params);
- DCHECK(transfer_state);
- base::TimeTicks begin_time(base::TimeTicks::HighResNow());
- glTexSubImage2D(
- tex_params.target,
- tex_params.level,
- tex_params.xoffset,
- tex_params.yoffset,
- tex_params.width,
- tex_params.height,
- tex_params.format,
- tex_params.type,
- data);
- texture_upload_count_++;
- total_texture_upload_time_ += base::TimeTicks::HighResNow() - begin_time;
-}
-
-void AsyncPixelTransferDelegateSync::WaitForTransferCompletion(
- AsyncPixelTransferState* state) {
- // Already done.
-}
-
-uint32 AsyncPixelTransferDelegateSync::GetTextureUploadCount() {
- return texture_upload_count_;
-}
-
-base::TimeDelta AsyncPixelTransferDelegateSync::GetTotalTextureUploadTime() {
- return total_texture_upload_time_;
-}
-
-void AsyncPixelTransferDelegateSync::ProcessMorePendingTransfers() {
-}
-
-bool AsyncPixelTransferDelegateSync::NeedsProcessMorePendingTransfers() {
- return false;
-}
-
-} // namespace gpu
-

Powered by Google App Engine
This is Rietveld 408576698