raster_command_buffer_stub.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (c) 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef GPU_IPC_SERVICE_RASTER_COMMAND_BUFFER_STUB_H_
  5. #define GPU_IPC_SERVICE_RASTER_COMMAND_BUFFER_STUB_H_
  6. #include "gpu/ipc/service/command_buffer_stub.h"
  7. namespace gpu {
  8. class GPU_IPC_SERVICE_EXPORT RasterCommandBufferStub
  9. : public CommandBufferStub {
  10. public:
  11. RasterCommandBufferStub(GpuChannel* channel,
  12. const mojom::CreateCommandBufferParams& init_params,
  13. CommandBufferId command_buffer_id,
  14. SequenceId sequence_id,
  15. int32_t stream_id,
  16. int32_t route_id);
  17. RasterCommandBufferStub(const RasterCommandBufferStub&) = delete;
  18. RasterCommandBufferStub& operator=(const RasterCommandBufferStub&) = delete;
  19. ~RasterCommandBufferStub() override;
  20. // This must leave the GL context associated with the newly-created
  21. // CommandBufferStub current, so the GpuChannel can initialize
  22. // the gpu::Capabilities.
  23. gpu::ContextResult Initialize(
  24. CommandBufferStub* share_group,
  25. const mojom::CreateCommandBufferParams& init_params,
  26. base::UnsafeSharedMemoryRegion shared_state_shm) override;
  27. MemoryTracker* GetContextGroupMemoryTracker() const override;
  28. private:
  29. void OnSwapBuffers(uint64_t swap_id, uint32_t flags) override;
  30. void SetActiveURL(GURL url) override;
  31. };
  32. } // namespace gpu
  33. #endif // GPU_IPC_SERVICE_RASTER_COMMAND_BUFFER_STUB_H_