text:
namespace gfx {
class JavaBitmap;
}

namespace {

// Used for drawing directly to the screen. Bypasses resizing and swaps.
class DirectOutputSurface : public cc::OutputSurface {
 public:
  DirectOutputSurface(
      const scoped_refptr<cc::ContextProvider>& context_provider)
      : cc::OutputSurface(context_provider) {
    capabilities_.adjust_deadline_for_parent = false;
  }

  virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE {
    surface_size_ = size;
  }
  virtual void SwapBuffers(cc::CompositorFrame*) OVERRIDE {
    context_provider_->ContextGL()->ShallowFlushCHROMIUM();
  }
};

// Used to override capabilities_.adjust_deadline_for_parent to false
class OutputSurfaceWithoutParent : public cc::OutputSurface {
 public:
  OutputSurfaceWithoutParent(const scoped_refptr<
      content::ContextProviderCommandBuffer>& context_provider)
      : cc::OutputSurface(context_provider) {
    capabilities_.adjust_deadline_for_parent = false;
  }

  virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE {
    content::ContextProviderCommandBuffer* provider_command_buffer =
        static_cast<content::ContextProviderCommandBuffer*>(
            context_provider_.get());
    content::CommandBufferProxyImpl* command_buffer_proxy =
        provider_command_buffer->GetCommandBufferProxy();
    DCHECK(command_buffer_proxy);
    command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info);

    OutputSurface::SwapBuffers(frame);
  }
};

class TransientUIResource : public cc::ScopedUIResource {
 public:
  static scoped_ptr<TransientUIResource> Create(
      cc::LayerTreeHost* host,
      const cc::UIResourceBitmap& bitmap) {
    return make_scoped_ptr(new TransientUIResource(host, bitmap));
  }

  virtual cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
                                         bool resource_lost) OVERRIDE {
    if (!retrieved_) {
      cc::UIResourceBitmap old_bitmap(bitmap_);

      // Return a place holder for all following calls to GetBitmap.
      SkBitmap tiny_bitmap;
      SkCanvas canvas(tiny_bitmap);
      tiny_bitmap.setConfig(
          SkBitmap::kARGB_8888_Config, 1, 1, 0, kOpaque_SkAlphaType);
      tiny_bitmap.allocPixels();
      canvas.drawColor(SK_ColorWHITE);
      tiny_bitmap.setImmutable();

      // Release our reference of the true bitmap.
      bitmap_ = cc::UIResourceBitmap(tiny_bitmap);

      retrieved_ = true;
      return old_bitmap;
    }
    return bitmap_;
  }

 protected:
  TransientUIResource(cc::LayerTreeHost* host,
                      const cc::UIResourceBitmap& bitmap)
      : cc::ScopedUIResource(host, bitmap), retrieved_(false) {}

 private:
  bool retrieved_;
};

static bool g_initialized = false;

} // anonymous namespace

namespace content {

typedef std::map<int, base::android::ScopedJavaGlobalRef<jobject> >
    SurfaceMap;
static base::LazyInstance<SurfaceMap>
    g_surface_map = LAZY_INSTANCE_INITIALIZER;
static base::LazyInstance<base::Lock> g_surface_map_lock;

// static
Compositor* Compositor::Create(CompositorClient* client,
                               gfx::NativeWindow root_window) {
  return client ? new CompositorImpl(client, root_window) : NULL;
}

// static
void Compositor::Initialize() {
  DCHECK(!CompositorImpl::IsInitialized());
  g_initialized = true;
}

// static
bool CompositorImpl::IsInitialized() {
  return g_initialized;
}

// static
jobject CompositorImpl::GetSurface(int surface_id) {
  base::AutoLock lock(g_surface_map_lock.Get());
  SurfaceMap* surfaces = g_surface_map.Pointer();
  SurfaceMap::iterator it = surfaces->find(surface_id);
  jobject jsurface = it == surfaces->end() ? NULL : it->second.obj();

  LOG_IF(WARNING, !jsurface) << "No surface for surface id " << surface_id;
  return jsurface;
}

CompositorImpl::CompositorImpl(CompositorClient* client,
                               gfx::NativeWindow root_window)
    : root_layer_(cc::Layer::Create()),
      has_transparent_background_(false),
      device_scale_factor_(1),
      window_(NULL),
      surface_id_(0),
      client_(client),
      root_window_(root_window) {
  DCHECK(client);
  DCHECK(root_window);
  ImageTransportFactoryAndroid::AddObserver(this);
  root_window->AttachCompositor();
}

CompositorImpl::~CompositorImpl() {
  root_window_->DetachCompositor();
  ImageTransportFactoryAndroid::RemoveObserver(this);
  // Clean-up any surface references.
  SetSurface(NULL);
}

void CompositorImpl::Composite() {
  if (host_)
    host_->Composite(gfx::FrameTime::Now());
}

void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) {
  root_layer_->RemoveAllChildren();
  root_layer_->AddChild(root_layer);
}

void CompositorImpl::SetWindowSurface(ANativeWindow* window) {
  GpuSurfaceTracker* tracker = GpuSurfaceTracker::Get();

  if (window_) {
    tracker->RemoveSurface(surface_id_);
    ANativeWindow_release(window_);
    window_ = NULL;
    surface_id_ = 0;
    SetVisible(false);
  }

  if (window) {
    window_ = window;
    ANativeWindow_acquire(window);
    surface_id_ = tracker->AddSurfaceForNativeWidget(window);
    tracker->SetSurfaceHandle(
        surface_id_,
        gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NATIVE_DIRECT));
    SetVisible(true);
  }
}

void CompositorImpl::SetSurface(jobject surface) {
  JNIEnv* env = base::android::AttachCurrentThread();
  base::android::ScopedJavaLocalRef<jobject> j_surface(env, surface);

  // First, cleanup any existing surface references.
  if (surface_id_) {
    DCHECK(g_surface_map.Get().find(surface_id_) !=
           g_surface_map.Get().end());
    base::AutoLock lock(g_surface_map_lock.Get());
    g_surface_map.Get().erase(surface_id_);
  }
  SetWindowSurface(NULL);

  // Now, set the new surface if we have one.
  ANativeWindow* window = NULL;
  if (surface)
    window = ANativeWindow_fromSurface(env, surface);
  if (window) {
    SetWindowSurface(window);
    ANativeWindow_release(window);
    {
      base::AutoLock lock(g_surface_map_lock.Get());
      g_surface_map.Get().insert(std::make_pair(surface_id_, j_surface));
    }
  }
}

void CompositorImpl::SetVisible(bool visible) {
  if (!visible) {
    ui_resource_map_.clear();
    host_.reset();
    client_->UIResourcesAreInvalid();
  } else if (!host_) {
    cc::LayerTreeSettings settings;
    settings.refresh_rate = 60.0;
    settings.impl_side_painting = false;
    settings.allow_antialiasing = false;
    settings.calculate_top_controls_position = false;
    settings.top_controls_height = 0.f;
    settings.use_memory_management = false;
    settings.highp_threshold_min = 2048;

    host_ = cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings);
    host_->SetRootLayer(root_layer_);

    host_->SetVisible(true);
    host_->SetLayerTreeHostClientReady();
    host_->SetViewportSize(size_);
    host_->set_has_transparent_background(has_transparent_background_);
    host_->SetDeviceScaleFactor(device_scale_factor_);
    // Need to recreate the UI resources because a new LayerTreeHost has been
    // created.
    client_->DidLoseUIResources();
  }
}

void CompositorImpl::setDeviceScaleFactor(float factor) {
  device_scale_factor_ = factor;
  if (host_)
    host_->SetDeviceScaleFactor(factor);
}

void CompositorImpl::SetWindowBounds(const gfx::Size& size) {
  if (size_ == size)
    return;

  size_ = size;
  if (host_)
    host_->SetViewportSize(size);
  root_layer_->SetBounds(size);
}

void CompositorImpl::SetHasTransparentBackground(bool flag) {
  has_transparent_background_ = flag;
  if (host_)
    host_->set_has_transparent_background(flag);
}

bool CompositorImpl::CompositeAndReadback(void *pixels, const gfx::Rect& rect) {
  if (host_)
    return host_->CompositeAndReadback(pixels, rect);
  else
    return false;
}

cc::UIResourceId CompositorImpl::GenerateUIResourceFromUIResourceBitmap(
    const cc::UIResourceBitmap& bitmap,
    bool is_transient) {
  if (!host_)
    return 0;

  cc::UIResourceId id = 0;
  scoped_ptr<cc::UIResourceClient> resource;
  if (is_transient) {
    scoped_ptr<TransientUIResource> transient_resource =
        TransientUIResource::Create(host_.get(), bitmap);
    id = transient_resource->id();
    resource = transient_resource.Pass();
  } else {
    scoped_ptr<cc::ScopedUIResource> scoped_resource =
        cc::ScopedUIResource::Create(host_.get(), bitmap);
    id = scoped_resource->id();
    resource = scoped_resource.Pass();
  }

  ui_resource_map_.set(id, resource.Pass());
  return id;
}

cc::UIResourceId CompositorImpl::GenerateUIResource(const SkBitmap& bitmap,
                                                    bool is_transient) {
  return GenerateUIResourceFromUIResourceBitmap(cc::UIResourceBitmap(bitmap),
                                                is_transient);
}

cc::UIResourceId CompositorImpl::GenerateCompressedUIResource(
    const gfx::Size& size,
    void* pixels,
    bool is_transient) {
  DCHECK_LT(0, size.width());
  DCHECK_LT(0, size.height());
  DCHECK_EQ(0, size.width() % 4);
  DCHECK_EQ(0, size.height() % 4);

  size_t data_size = size.width() * size.height() / 2;
  SkImageInfo info = {size.width(), size.height() / 2, kAlpha_8_SkColorType,
                      kPremul_SkAlphaType};
  skia::RefPtr<SkMallocPixelRef> etc1_pixel_ref =
      skia::AdoptRef(SkMallocPixelRef::NewAllocate(info, 0, 0));
  memcpy(etc1_pixel_ref->getAddr(), pixels, data_size);
  etc1_pixel_ref->setImmutable();
  return GenerateUIResourceFromUIResourceBitmap(
      cc::UIResourceBitmap(etc1_pixel_ref, size), is_transient);
}

void CompositorImpl::DeleteUIResource(cc::UIResourceId resource_id) {
  UIResourceMap::iterator it = ui_resource_map_.find(resource_id);
  if (it != ui_resource_map_.end())
    ui_resource_map_.erase(it);
}

static scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
CreateGpuProcessViewContext(
    const blink::WebGraphicsContext3D::Attributes attributes,
    int surface_id) {
  BrowserGpuChannelHostFactory* factory =
      BrowserGpuChannelHostFactory::instance();
  CauseForGpuLaunch cause =
      CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE;
  scoped_refptr<GpuChannelHost> gpu_channel_host(
      factory->EstablishGpuChannelSync(cause));
  if (!gpu_channel_host)
    return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>();

  GURL url("chrome://gpu/Compositor::createContext3D");
  static const size_t kBytesPerPixel = 4;
  gfx::DeviceDisplayInfo display_info;
  size_t full_screen_texture_size_in_bytes =
      display_info.GetDisplayHeight() *
      display_info.GetDisplayWidth() *
      kBytesPerPixel;
  WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
  limits.command_buffer_size = 64 * 1024;
  limits.start_transfer_buffer_size = 64 * 1024;
  limits.min_transfer_buffer_size = 64 * 1024;
  limits.max_transfer_buffer_size = std::min(
      3 * full_screen_texture_size_in_bytes, kDefaultMaxTransferBufferSize);
  limits.mapped_memory_reclaim_limit = 2 * 1024 * 1024;
  return make_scoped_ptr(
      new WebGraphicsContext3DCommandBufferImpl(surface_id,
                                                url,
                                                gpu_channel_host.get(),
                                                attributes,
                                                false,
                                                limits));
}

scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
    bool fallback) {
  blink::WebGraphicsContext3D::Attributes attrs;
  attrs.shareResources = true;
  attrs.noAutomaticFlushes = true;

  DCHECK(window_);
  DCHECK(surface_id_);

  scoped_refptr<ContextProviderCommandBuffer> context_provider =
      ContextProviderCommandBuffer::Create(
          CreateGpuProcessViewContext(attrs, surface_id_), "BrowserCompositor");
  if (!context_provider.get()) {
    LOG(ERROR) << "Failed to create 3D context for compositor.";
    return scoped_ptr<cc::OutputSurface>();
  }

  return scoped_ptr<cc::OutputSurface>(
      new OutputSurfaceWithoutParent(context_provider));
}

void CompositorImpl::OnLostResources() {
  client_->DidLoseResources();
}

scoped_refptr<cc::ContextProvider> CompositorImpl::OffscreenContextProvider() {
  // There is no support for offscreen contexts, or compositor filters that
  // would require them in this compositor instance. If they are needed,
  // then implement a context provider that provides contexts from
  // ImageTransportSurfaceAndroid.
  return NULL;
}

void CompositorImpl::DidCompleteSwapBuffers() {
  client_->OnSwapBuffersCompleted();
}

void CompositorImpl::ScheduleComposite() {
  client_->ScheduleComposite();
}

void CompositorImpl::ScheduleAnimation() {
  ScheduleComposite();
}

void CompositorImpl::DidPostSwapBuffers() {
  TRACE_EVENT0("compositor", "CompositorImpl::DidPostSwapBuffers");
  client_->OnSwapBuffersPosted();
}

void CompositorImpl::DidAbortSwapBuffers() {
  TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers");
  client_->OnSwapBuffersCompleted();
}

void CompositorImpl::DidCommit() {
  root_window_->OnCompositingDidCommit();
}

} // namespace content


text:
Michael Buble announces 2018 Croke Park gig
MICHAEL BUBLÉ LIVE AT CROKE PARK - SATURDAY 7TH JULY
Tickets go on sale Friday 17 November at 9am
Multiple Grammy and Juno award winner Michael Bublé has today announced a fully seated concert at Croke Park on Saturday 07 July.
This will be the undisputed 'King of Cool's only Irish show in 2018.
Michael has toured the globe 5 times and has sold out Aviva Stadium in 2010 followed by four successive nights at The O2 Dublin in 2013.
Michael Bublé's classic voice, endearing charm and sheer panache have seen him compared with the great singers and entertainers. He has carved a unique place in the hearts of fans around the world and lit up pop charts since his debut album in 2005, bringing jazz standards to a new generation while scoring his own original hits including the unforgettable global smashes 'Home', 'Haven't Met You Yet', 'Everything' and 'Lost'.
Michael Bublé says 'I can't wait to come over to see my fans in Dublin and play Croke Park for my largest ever Irish show! You guys have been patient and I can't thank you enough for all your support. And for those of you that haven't seen me live, well… I just haven't met you yet!'
With 3 Number 1 albums and a classic 'Christmas' album to his name, he is an artist welcomed in every Irish household.
Nobody But Me, his seventh major label studio album, was released in October 2016. The record debuted at #2 on the Irish charts and went platinum in the UK in January. Alongside classic jazz and standards, it features beautiful collaborations.
Tickets from €89.50 including booking fee go on sale Friday 17 November at 9am at Ticketmaster.ie and all Ticketmaster outlets nationwide.
Find out more: www.michaelbuble.com

redpajama_set_name: RedPajamaCommonCrawl


text:
Páirc MacUílín is a Gaelic Athletic Association playing field in Ballycastle, County Antrim.
It is the home of the McQuillan GAC Ballycastle club, one of the most successful teams in the county, and is one of the main grounds of Antrim's hurling teams. The grounds have two full size pitches, floodlight facilities, a training area, a Hurling wall as well as multi-purpose clubrooms. The club also has a wind turbine installed on site.
It officially opened in 2007, the centenary year of McQuillan GAC Ballycastle, with GAA President Nickey Brennan, newly installed Ulster President Tom Daly and Antrim chairman Dr John McSparron in attendance. The first match was a friendly between the home side and Kilkenny club James Stephens. In December 2012 Páirc MacUílín received the Antrim and Ulster GAA Ground of the Year awards.
Pitch 1 at Páirc MacUílín
Páirc MacUílín has also hosted the Antrim Senior Hurlers in recent years due to the ongoing redevelopment of Casement Park. It was the home of the county hurling team from 2014 until 2016.
Aerial view of Páirc MacUílín (Photo: Ciaran Laverty)
It was also selected as the location for the Antrim Senior Hurling Championship finals in 2013, 2014 and 2016.
Matches from three different senior inter county competitions have been held at the venue including the Allianz National Hurling League, Leinster Senior Hurling Championship and the All-Ireland Senior Hurling Championship.
Aerial view of the pitches at Páirc MacUílín
Antrim GAA Club Ground of the Year 2012
Ulster GAA Club Ground of the Year 2012
Inter County Matches at Páirc MacUílín
Follow Páirc MacUílín on Twitter
Tweets by PaircMacUilin


text:
DONIZETTI, Gaetano 1797-1848
Betly [Piano-vocal score]
Napoli: Stabilimento Musicale Partenopeo [PNs 3205-10, 3219, 3590-1, 3607, 4054, 4010-1, 4207-8], 1850. Oblong folio. 19th century dark red leather-backed green cloth boards with decorative devices gilt to spine; marbled endpapers. 123 pp. Each number with separate caption title and secondary pagination. Engraved. Printed note to title indicating the 5 pieces added to the original version.With handstamp "Scuola di Canto dei Mo. Lombardini" to title and several pages throughout. Occasional performance markings in lead and blue pencil, including notated vocal embellishments.From the collection of Italian conductor, vocal coach, and close associate of Puccini and Mascagni, Luigi Ricci (1893-1981). Binding slightly worn, rubbed, and bumped; remnants of paper label to spine. Lightly thumbed and foxed, heavier to some leaves; several corners with tape repairs. First Edition, later issue, of the two-act version, later issue. Inzaghi IN. 58, p. 178. Scarce (3 copies only outside Italy).Betly (or La capanna svizzera), a dramma giocoso to Donizetti's own libretto after Scribe, Mélesville, and Goethe, premiered in one act in Naples at the Teatro Nuovo on 21 August 1836. The present revised version in two acts was also premiered in Naples, on 29 September 1837."Betly has a score full of unpretentious charm and a plot that works well on the stage. The role of Daniele is akin to that of Nemorino in L'elisir d'amore. The highlights of the score are Betly's solo moments: her sortita and her aria-finale, the former particularly for its local colour, with a yodel-like refrain." William Ashb … [Click Below for Full Description]
Bookseller: J & J Lubrano Music Antiquarians LLC [United States]
LINK TO THIS PAGE: https://www.vialibri.net/years/books/278405259/1850-donizetti-gaetano-1797-1848-betly-piano-vocal-score


Easypr.ng, an online marketing and media content distribution platform has launched in Lagos. Through the platform, individual and corporate organisations in need of public relations and other marketing services can customize required service to suit their budget plans.
It provides access to hundreds of newspapers and online news publishing platforms across Africa.
Companies and individuals looking to distribute press materials such as such as Press releases, news features, interviews and photo news, can create the contents and distribute through the platform by paying a fee depending on the number of media platforms required.
Users can also through the website, www.easypr.ng buy other marketing services such as digital marketing solutions including social media, advertising services, content writing and consultancy services.
Speaking about the solution, Co-founder, Easypr.ng, Afam Anyika said: "Our intention is to make sure that we deepen access to marketing services and at the same time make the process as seamless as possible. Through our solution, companies and individuals especially those without an idea on how to start, could get everything that they require from the platform without leaving the comfort of their homes or business places.
"For startups and individuals looking to get their word out there, there is dearth of marketing information available to make informed marketing decisions. That is the gap we have bridged with Easypr.ng. We understand the deep importance of SME's to the nation and Africa's economic growth. Put side by side the scarcely available marketing know-how for these businesses, our service aims to bridge the divide with a mission to significantly scale the SME sector in our part of the world, with success being the direct impact on varying economic/ market indicators.
"We not only provide these information, we give you the leverage to run a marketing campaign from the comfort of your house or office without wasting time on meetings and additional fees as seen with marketing agencies. It is more of a Do-It-Yourself for marketing.